예제 #1
0
        static Backgrounds()
        {
            last_move_bitmap  = Properties.Resources.background_last_move;
            explored_bitmap   = Properties.Resources.background_explored;
            unexplored_bitmap = Properties.Resources.background_unexplored;

            dictionary = new Dictionary <SquareVisitedState, System.Drawing.Bitmap>();
            dictionary.Add(SquareVisitedState.last(), last_move_bitmap);
            dictionary.Add(SquareVisitedState.explored(), explored_bitmap);
            dictionary.Add(SquareVisitedState.unexplored(), unexplored_bitmap);
        }
예제 #2
0
        //Copy constructor
        public GameBoard(GameBoard set_from) : base()
        {
            board_size = set_from.board_size;

            //Initialize 10x10 grid
            for (int i = 0; i < 10; i++)
            {
                for (int j = 0; j < 10; j++)
                {
                    board_data[i].Add(new BoardSquare((BoardSquare)set_from.board_data[i][j]));
                    if (board_data[i][j].visited_state == SquareVisitedState.last() && !board_data[i][j].bender_present)
                    {
                        board_data[i][j].visited_state = SquareVisitedState.explored();
                    }
                }
            }

            add_walls();

            bender = new Unit(set_from.bender);
        }