Skip to content

Instantly share code, notes, and snippets.

@cocodrips
Created September 30, 2015 14:18
Show Gist options
  • Save cocodrips/8aba2c76858eb96da4f3 to your computer and use it in GitHub Desktop.
Save cocodrips/8aba2c76858eb96da4f3 to your computer and use it in GitHub Desktop.
2次元配列問題
class Board {
private:
char _board[Y * X];
public:
char get(Pos pos) {
return _board[pos.y * X + pos.x];
}
void set(char value, Pos pos) {
_board[pos.y * X + pos.x] = value;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment