Exemplo n.º 1
0
        private void place_tile()
        {
            var available_tiles = board.Select((s, i) => i).Where(s => board[s] == 0);
            var selected        = random.GenerateValue(available_tiles.Count() - 1);
            var new_tile        = available_tiles.ElementAt(selected);

            board[new_tile] = get_new_tile_value();
        }