本文整理汇总了C++中Points::Size方法的典型用法代码示例。如果您正苦于以下问题:C++ Points::Size方法的具体用法?C++ Points::Size怎么用?C++ Points::Size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Points
的用法示例。
在下文中一共展示了Points::Size方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Add_last
void Points::Add_last(Points& other)
{
Point buf;
for (int i = 0, size = other.Size(); i < size; ++i)
{
buf = other.Get(i);
Add_last(buf.x, buf.y);
}
}
示例2: put_coockie
bool TableCloth::put_coockie(Points& reverse_list)
{
char cookie = m_turn_player ? 'o' : 'x';
Point put_point = { -1, -1, };
int start_i_j = ( m_turn_player ? 0 : 7 );
int end_i_j = ( m_turn_player ? 8 : -1);
int change_num = ( m_turn_player ? 1 : -1);
for (int i = start_i_j; i != end_i_j; i += change_num)
{
for (int j = start_i_j; j != end_i_j; j += change_num)
{
if ( m_table_cloth[i][j] != '.' ) continue;
Point start = { i, j, };
Points buf_list;
for (int x = -1; x <= 1; ++x)
{
for (int y = -1; y <= 1; ++y)
{
if ( x == 0 and y == 0 ) continue;
Find_place(start, x, y, cookie, buf_list);
}
}
if (reverse_list.Size() < buf_list.Size() )
{
reverse_list = buf_list;
put_point.x = i;
put_point.y = j;
}
}
}
if ( put_point.x == -1 and put_point.y == -1 ) return false;
m_table_cloth[put_point.x][put_point.y] = cookie;
return true;
}