Created
September 30, 2015 14:18
-
-
Save cocodrips/8aba2c76858eb96da4f3 to your computer and use it in GitHub Desktop.
2次元配列問題
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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