public CLocalServer() { this.players = new List <CPlayer>(); this.players.Add(new CPlayer(0, PLAYER_TYPE.HUMAN, this.send, this)); this.players.Add(new CPlayer(1, PLAYER_TYPE.AI, null, this)); this.game_room = new CGameRoom(this); for (int i = 0; i < this.players.Count; ++i) { this.game_room.add_player(this.players[i]); } }
public CLocalServer() { this.players = new List<CPlayer>(); this.players.Add(new CPlayer(0, PLAYER_TYPE.HUMAN, this.send, this)); this.players.Add(new CPlayer(1, PLAYER_TYPE.AI, null, this)); this.game_room = new CGameRoom(this); for (int i = 0; i < this.players.Count; ++i) { this.game_room.add_player(this.players[i]); } }
public CGameRoomPlayState(CGameRoom room) { this.room = room; this.room.state_manager.register_message_handler(this, PROTOCOL.MOVING_REQ, this.moving_req); this.room.state_manager.register_message_handler(this, PROTOCOL.TURN_FINISHED_REQ, this.turn_finished); // 7*7(총 49칸)모양의 보드판을 구성한다. // 초기에는 모두 빈공간이므로 EMPTY_SLOT으로 채운다. this.gameboard = new List <short>(); this.table_board = new List <short>(); for (byte i = 0; i < COLUMN_COUNT * COLUMN_COUNT; ++i) { this.gameboard.Add(EMPTY_SLOT); this.table_board.Add(i); } }
public CGameRoomReadyState(CGameRoom room) { this.room = room; //this.room.state_manager.register_message_handler(this, PROTOCOL.ENTER_GAME_ROOM_REQ, this.on_ready_req); }
public CGameRoomReadyState(CGameRoom room) { this.room = room; this.room.state_manager.register_message_handler(this, PROTOCOL.READY_TO_START, this.on_ready_req); }
public CGameRoomPlayState(CGameRoom room) { this.room = room; }