{"id":6807,"date":"2016-01-28T22:25:01","date_gmt":"2016-01-28T13:25:01","guid":{"rendered":"http:\/\/nanoappli.com\/blog\/?p=6807"},"modified":"2016-01-28T22:25:01","modified_gmt":"2016-01-28T13:25:01","slug":"c%e3%81%a72048%e3%82%b2%e3%83%bc%e3%83%a0%e3%81%ae%e3%82%af%e3%83%ad%e3%83%bc%e3%83%b3%e3%82%92%e4%bd%9c%e3%82%8b%e3%81%9d%e3%81%ae4","status":"publish","type":"post","link":"http:\/\/nanoappli.com\/blog\/archives\/6807","title":{"rendered":"C#\u30672048\u30b2\u30fc\u30e0\u306e\u30af\u30ed\u30fc\u30f3\u3092\u4f5c\u308b[\u305d\u306e4]"},"content":{"rendered":"<p>\n\u4eca\u65e5\u306f\u3001\u524d\u56de\u306e\u4e88\u5b9a\u901a\u308a\u76e4\u9762\u306e\u7ba1\u7406\u3092\u5225\u30af\u30e9\u30b9\u306b\u5206\u3051\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u3092\u884c\u3063\u305f\u3060\u3051\u306a\u306e\u3067\u3001\u524d\u56de\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u3067\u304d\u308b\u3053\u3068\u306f\u5168\u304f\u540c\u3058\u3067\u3059\u3002<br \/>\n<br \/>\n<br \/>\n\u307e\u305a\u306f\u3001\u753b\u9762\u3092\u7ba1\u7406\u3057\u3066\u3044\u308bForm1.cs\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002<br \/>\n\u76e4\u9762\u7ba1\u7406\u3092BoardManager\u306b\u9003\u304c\u3057\u305f\u306e\u3067\u3001\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u306b\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\n<pre lang=\"csharp\">\nusing System;\nusing System.Collections.Generic;\nusing System.Data;\nusing System.Windows.Forms;\n\nnamespace Mock2048 {\n    public partial class Form1 : Form {\n        BoardManager boardMgr;\n\n        public Form1() {\n            InitializeComponent();\n\n            \/\/ \u30dc\u30fc\u30c9\u30de\u30cd\u30fc\u30b8\u30e3\u306e\u751f\u6210\n            boardMgr = new BoardManager();\n        }\n\n        \/\/*********************************************************************\n        \/\/\/ <summary> \u753b\u9762\u8868\u793a\u6642\u306e\u30cf\u30f3\u30c9\u30e9\n        \/\/\/ <\/summary>\n        \/\/*********************************************************************\n        private void Form1_Load( object sender, EventArgs e ) {\n\n            \/\/ Form\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u81ea\u8eab\u304c\u30ad\u30fc\u5165\u529b\u3092\u53d6\u5f97\u53ef\u80fd\u3068\u3059\u308b\n            this.KeyPreview = true;\n\n            \/\/\u76e4\u9762\u306e\u521d\u671f\u5316\n            boardMgr.initBoard();\n\n            \/\/ \u76e4\u9762\u3092\u8868\u793a\u3059\u308b\n            boardMgr.displayBoard(txtLog); \n        }\n\n\n        \/\/*********************************************************************\n        \/\/\/ <summary> \u30ad\u30fc\u5165\u529b\u6642\u306e\u30cf\u30f3\u30c9\u30e9\n        \/\/\/ <\/summary>\n        \/\/*********************************************************************\n        private void Form1_KeyDown( object sender, KeyEventArgs e ) {\n            DIR direction;\n\n            \/\/ \u30b2\u30fc\u30e0\u30aa\u30fc\u30d0\u30fc\u306e\u3068\u304d\u306f\u4f55\u3082\u3057\u306a\u3044\n            if (boardMgr.IsGameOver) {\n                return;\n            }\n\n            \/\/ \u30b9\u30e9\u30a4\u30c9\u65b9\u5411\u3092\u5224\u5b9a\u3059\u308b\n            switch (e.KeyCode) {\n                case Keys.Up:    direction = DIR.UP;    break;\n                case Keys.Right: direction = DIR.RIGHT; break;\n                case Keys.Down:  direction = DIR.DOWN;  break;\n                case Keys.Left:  direction = DIR.LEFT;  break;\n                default:\n                    \/\/ \u77e2\u5370\u30ad\u30fc\u4ee5\u5916\u306f\u7121\u8996\n                    return; \n            }\n\n            \/\/ \u6307\u5b9a\u3055\u308c\u305f\u65b9\u5411\u306b\u79fb\u52d5\u3055\u305b\u308b\n            bool isMove = boardMgr.slideCell( direction );\n            if ( !isMove ) {\n                \/\/ \u30b9\u30e9\u30a4\u30c9\u3055\u305b\u3066\u307f\u305f\u304c1\u30bb\u30eb\u3082\u52d5\u304b\u306a\u304b\u3063\u305f -> \u4f55\u3082\u3057\u306a\u304b\u3063\u305f\u3068\u307f\u306a\u3059\n                return;\n            }\n            \n            \/\/ \u76e4\u9762\u3092\u8868\u793a\u3059\u308b\n            boardMgr.displayBoard(txtLog);\n        }\n    }\n}\n<\/pre>\n<br \/>\n<br \/>\n<br \/>\n\u6b21\u306bBoardManager.cs\u3067\u3059\u3002<br \/>\n\u3053\u3061\u3089\u306f\u3001\u30e1\u30bd\u30c3\u30c9\u3092\u79fb\u3057\u305f\u4e0a\u3067public\/private\u306e\u30b9\u30b3\u30fc\u30d7\u3092\u898b\u76f4\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n<pre lang=\"csharp\">\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\n\npublic enum DIR {\n    UP,\n    RIGHT,\n    DOWN,\n    LEFT,\n};\n\npublic class BoardManager {\n    const int BOARD_SIZE = 4;\n\n    \/\/ \u30b2\u30fc\u30e0\u306e\u72b6\u614b(\u30b2\u30fc\u30e0\u30aa\u30fc\u30d0\u30fc\u3057\u305f\u304b\u5426\u304b)\n    private bool isGameOver = false;\n    public  bool IsGameOver {\n        get{ return this.isGameOver; }\n    }\n\n    \/\/ \u4e71\u6570\n    System.Random rand = new Random();\n\n    \/\/ \u76e4\u9762\u306e\u60c5\u5831\n    private int[,] board = new int[BOARD_SIZE,BOARD_SIZE];      \n\n    \/\/*********************************************************************\n    \/\/\/ <summary> \u76e4\u9762\u306e\u521d\u671f\u5316\u3092\u884c\u3046\n    \/\/\/ <\/summary>\n    \/\/*********************************************************************\n    public void initBoard() {\n        isGameOver = false;\n\n        \/\/ \u30e9\u30f3\u30c0\u30e0\u306b2\u30de\u30b9\u57cb\u3081\u308b\n        for (int loop = 0; loop < 2; loop++) {\n            _addCell();\n        }\n    }\n\n    \/\/*********************************************************************\n    \/\/\/ <summary> \u76e4\u9762\u3092\u753b\u9762\u306b\u8868\u793a\u3055\u305b\u308b\n    \/\/\/ <\/summary>\n    \/\/*********************************************************************\n    public void displayBoard( System.Windows.Forms.TextBox displayArea ) {\n\n        \/\/ \u30b2\u30fc\u30e0\u30aa\u30fc\u30d0\u30fc\u306e\u3068\u304d\u306f\u63cf\u753b\u3057\u306a\u3044\n        if (isGameOver) {\n            displayArea.Text = \"GAME OVER\";\n            return;\n        }\n\n        string boardData = \"\";\n\n        \/\/ \u3059\u3079\u3066\u306e\u884c\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u3059\u307e\u3067\u7e70\u308a\u8fd4\u3057\n        for (int y = 0; y < 4; y++) {\n            \/\/ 1\u884c\u5206\u306e\u30c7\u30fc\u30bf\u3092\u51fa\u529b\n            for (int x = 0; x < 4; x++) {\n                boardData += \"[\" + String.Format(\"{0, 2}\", board[x,y]) + \"] \";\n            }\n            boardData += Environment.NewLine;\n            boardData += Environment.NewLine;\n        }\n\n        displayArea.Text = boardData;\n\n        log( \"** Board\u3092\u63cf\u753b\u3057\u307e\u3059**\" );\n        log( boardData );\n\n        displayArea.Select(0,0);\n        displayArea.ReadOnly = true;\n    }\n\n    \/\/*********************************************************************\n    \/\/\/ <summary>\u3000\u6307\u5b9a\u3055\u308c\u305f\u65b9\u5411\u306b\u79fb\u52d5\u3055\u305b\u308b\n    \/\/\/ <\/summary>\n    \/\/\/ <param name=\"keyCode\"><\/param>\n    \/\/*********************************************************************\n    public bool slideCell( DIR dir ) {\n        bool isMove = false;\n        bool retVal;\n\n        \/\/ \u5165\u529b\u3055\u308c\u305f\u30ad\u30fc\u3092\u5224\u5b9a\u3059\u308b\n        switch ( dir ) {\n            case DIR.UP:\n                \/\/ 2\uff5e4\u5217\u76ee\u306b\u5bfe\u3057\u4e0a\u65b9\u5411\u306e\u30b9\u30e9\u30a4\u30c9\u3092\u8a66\u307f\u308b\n                for (int y = 1; y < BOARD_SIZE; y++) {\n                    for (int x = 0; x < BOARD_SIZE; x++) {  \n                        retVal = _moveCell( x, y, dir );\n                        isMove = (retVal==true) ? true : isMove;\n                    }\n                }\n                break;\n            case DIR.DOWN:\n                \/\/ 1\uff5e3\u5217\u76ee\u306b\u5bfe\u3057\u4e0b\u65b9\u5411\u306e\u30b9\u30e9\u30a4\u30c9\u3092\u8a66\u307f\u308b\n                for (int y = BOARD_SIZE-2; y >= 0; y--) {\n                    for (int x = 0; x < BOARD_SIZE; x++) {  \n                        retVal = _moveCell( x, y, dir );\n                        isMove = (retVal==true) ? true : isMove;\n                    }\n                }\n                break;\n            case DIR.LEFT:\n                \/\/ 2\uff5e4\u884c\u76ee\u306b\u5bfe\u3057\u5de6\u65b9\u5411\u306e\u30b9\u30e9\u30a4\u30c9\u3092\u8a66\u307f\u308b\n                for (int y = 0; y < BOARD_SIZE; y++) {\n                    for (int x = 1; x < 4; x++) {\n                        retVal = _moveCell( x, y, dir );\n                        isMove = (retVal==true) ? true : isMove;\n                    }\n                }\n                break;\n            case DIR.RIGHT:\n                \/\/ 1\uff5e3\u884c\u76ee\u306b\u5bfe\u3057\u53f3\u65b9\u5411\u306e\u30b9\u30e9\u30a4\u30c9\u3092\u8a66\u307f\u308b\n                for (int y = 0; y < BOARD_SIZE; y++) {\n                    for (int x = BOARD_SIZE-2; x >= 0; x--) {\n                        retVal = _moveCell( x, y, dir );\n                        isMove = (retVal==true) ? true : isMove;\n                    }\n                }\n                break;\n            default:\n                \/\/txtLog.Text = \"\";\n                break;                        \n        }\n        log( \"\u30bb\u30eb\u3092\u30b9\u30e9\u30a4\u30c9\u3055\u305b\u307e\u3057\u305f \u65b9\u5411=\" + dir.ToString() + \" \u79fb\u52d5\u3042\u308a?=\" + isMove );\n\n\n        \/\/ \u30bb\u30eb\u3092\u8ffd\u52a0\u3059\u308b\n        bool isSuccess = _addCell();\n        if (!isSuccess) {\n            \/\/ \u30bb\u30eb\u304c\u8ffd\u52a0\u3067\u304d\u306a\u3044(=\u7a7a\u30bb\u30eb\u304c\u306a\u3044)\u6642\u306f\u3001\u30b2\u30fc\u30e0\u30aa\u30fc\u30d0\u30fc\u3068\u307f\u306a\u3059\n            isGameOver = true;\n        }\n\n        \/\/ \u8ffd\u52a0\u3057\u305f\u7d50\u679c\u3001\u307e\u3060\u30b9\u30e9\u30a4\u30c9\u53ef\u80fd\u304b\u30c1\u30a7\u30c3\u30af\n        if (!_canSlide()) {\n            \/\/ \u3069\u306e\u65b9\u5411\u306b\u3082\u30b9\u30e9\u30a4\u30c9\u3067\u304d\u306a\u3044\u5834\u5408\u306f\u3001\u8a70\u307f\u306a\u306e\u3067\u30b2\u30fc\u30e0\u30aa\u30fc\u30d0\u30fc\n            isGameOver = true;\n        }\n\n        return isMove;\n    }\n\n\n    \/\/*********************************************************************\n    \/\/\/ <summary> \u7a7a\u3044\u3066\u3044\u308b\u3068\u3053\u308d\u306b\u30011\u3064\u30bb\u30eb\u3092\u8ffd\u52a0\u3059\u308b\n    \/\/\/ <\/summary>\n    \/\/\/ <returns><\/returns>\n    \/\/*********************************************************************\n    private bool _addCell() {\n\n        \/\/ \u3042\u3044\u3066\u3044\u308b\u30bb\u30eb\u30921\u3064\u53d6\u5f97\u3059\u308b\n        Tuple<int,int> freePos = _getEmptyCell_AtRandom();\n        if (freePos == null) {\n            return false; \/\/ \u7a7a\u30bb\u30eb\u7121\u3057\n        }\n\n        \/\/ \u53d6\u5f97\u3057\u305f\u7a7a\u30bb\u30eb\u306b\u30bb\u30c3\u30c8\u3059\u308b\n        int val = rand.Next(1,3) * 2;\n        board[freePos.Item1,freePos.Item2] = val;\n\n        log( \"  -> \u30bb\u30c3\u30c8\u3059\u308b\u5024=\" + val );\n\n        return true;\n    }\n\n\n    \/\/*********************************************************************\n    \/\/\/ <summary> \u7a7a\u30bb\u30eb\u3092\u30e9\u30f3\u30c0\u30e0\u30671\u3064\u53d6\u5f97\u3059\u308b\n    \/\/\/ <\/summary>\n    \/\/\/ <returns><\/returns>\n    \/\/*********************************************************************\n    private Tuple<int,int> _getEmptyCell_AtRandom() {\n        List<Tuple<int,int>> emptyCellList = new List<Tuple<int,int>>();\n\n        \/\/ \u7a7a\u30bb\u30eb\u3092\u5168\u90e8List\u306b\u96c6\u3081\u308b\n        for (int y = 0; y < BOARD_SIZE; y++) {\n            for (int x = 0; x < BOARD_SIZE; x++) {\n                if ( board[x,y] == 0 ) {\n                    emptyCellList.Add( new Tuple<int,int>(x,y) );\n                }\n            }\n        }           \n        if (emptyCellList.Count <= 0) {\n            \/\/ \u7a7a\u30bb\u30eb\u304c1\u3064\u3082\u7121\u3044! ->null\u3092\u8fd4\u3057\u3066\u7d42\u4e86\u3002\n            return null;\u3000\n        }\n\n        \/\/ \u7a7a\u30bb\u30eb\u306e\u4e2d\u304b\u30891\u3064\u3092\u30e9\u30f3\u30c0\u30e0\u3067\u62bd\u9078\u3059\u308b\n        int offset = rand.Next(0, emptyCellList.Count-1);\n        Tuple<int,int> emptyCell = emptyCellList[offset];\n\n        log( \"\u7a7a\u30bb\u30eb\u3092\u53d6\u5f97\u3057\u307e\u3057\u305f [\" + emptyCell.Item1 + \", \" + emptyCell.Item2 + \"] \u6b8b\u308a\u306e\u7a7a\u6570=\" + (emptyCellList.Count-1) );\n        return emptyCell;\n    }\n\n\n    \/\/*********************************************************************\n    \/\/\/ <summary>\u3000\u30bb\u30eb\u306e\u30b9\u30e9\u30a4\u30c9\u304c\u53ef\u80fd\u304c\u30c1\u30a7\u30c3\u30af\u3059\u308b\n    \/\/\/ <\/summary>\n    \/\/\/ <returns><\/returns>\n    \/\/*********************************************************************\n    private bool _canSlide() {\n        \/\/ \u4e0a\u4e0b\u306b\u9023\u7d9a\u3057\u3066\u540c\u3058\u6570\u5b57\u304c\u3042\u308b\u304b\u30c1\u30a7\u30c3\u30af\n        for (int x = 0; x < BOARD_SIZE; x++) {\n            for (int y = 0; y < BOARD_SIZE; y++) {\n                if (board[x, y] == 0) {\n                    \/\/ \u7a7a\u30bb\u30eb\u304c\u3042\u308b -> \u30b9\u30e9\u30a4\u30c9\u53ef\u80fd\n                    return true;\n                }\n\n                if (x != BOARD_SIZE-1 && board[x, y] == board[x+1, y]) {\n                    \/\/ \u53f3\u306b\u540c\u3058\u6570\u5b57\u304c\u7d9a\u304f\u5834\u6240\u304c\u3042\u308b -> \u30b9\u30e9\u30a4\u30c9\u53ef\u80fd\n                    return true;\n                }\n                if (y != BOARD_SIZE-1 && board[x, y] == board[x, y+1]) {\n                    \/\/ \u4e0b\u306b\u540c\u3058\u6570\u5b57\u304c\u7d9a\u304f\u5834\u6240\u304c\u3042\u308b -> \u30b9\u30e9\u30a4\u30c9\u53ef\u80fd\n                    return true;\n                }\n\n            }\n        }\n            \n        \/\/ \u3053\u3053\u307e\u3067\u304d\u305f -> \u3069\u306e\u65b9\u5411\u306b\u3082\u30b9\u30e9\u30a4\u30c9\u3067\u304d\u306a\u3044\n        return false;\n    }\n\n\n    \/\/*********************************************************************\n    \/\/\/ <summary>\u3000\u6307\u5b9a\u3055\u308c\u305f\u65b9\u5411\u306b\u30bb\u30eb\u3092\u30b9\u30e9\u30a4\u30c9\u3055\u305b\u308b\n    \/\/\/ <\/summary>\n    \/\/\/ <param name=\"x\"><\/param>\n    \/\/\/ <param name=\"y\"><\/param>\n    \/\/\/ <param name=\"dir\"><\/param>\n    \/\/*********************************************************************\n    private bool _moveCell( int x, int y, DIR dir ) {\n        int endX;\n        int endY;\n        bool isDuplicate;\n\n        \/\/ \u79fb\u52d5\u5148\u306e\u30bb\u30eb\u4f4d\u7f6e\u3092\u6c42\u3081\u308b\n        _getDestPos( x, y, dir, out endX, out endY, out isDuplicate );\n\n        \/\/ \u30bb\u30eb\u3092\u79fb\u52d5\n        int targetVal = board[x,y];\n        board[x,y] = 0;\n        board[endX,endY] = targetVal * (isDuplicate ? 2 : 1 );\n\n        \/\/ \u30bb\u30eb\u304c\u52d5\u3044\u305f\u304b\u5426\u304b\u3092\u8fd4\u3059\n        bool isMove;\n        if (x == endX && y == endY) {\n            isMove = false;\n        } else {\n            isMove = true;\n        }\n\n        return isMove;\n    }\n\n\n    \/\/*********************************************************************\n    \/\/\/ <summary>\u3000\u6307\u5b9a\u3055\u308c\u305f\u65b9\u5411\u306b\u30bb\u30eb\u3092\u30b9\u30e9\u30a4\u30c9\u3055\u305b\u305f\u6642\u306e\u79fb\u52d5\u5148\u3092\u6c42\u3081\u308b\n    \/\/\/ <\/summary>\n    \/\/\/ <param name=\"x\"><\/param>\n    \/\/\/ <param name=\"y\"><\/param>\n    \/\/\/ <param name=\"dir\"><\/param>\n    \/\/\/ <param name=\"endX\"><\/param>\n    \/\/\/ <param name=\"endY\"><\/param>\n    \/\/\/ <param name=\"isDuplicate\"><\/param>\n    \/\/*********************************************************************\n    private void _getDestPos( int x, int y, DIR dir, out int endX, out int endY, out bool isDuplicate ) {\n\n        \/\/ initialize\n        endX = x;\n        endY = y;\n        isDuplicate = false;\n\n        \/\/ \u6307\u5b9a\u3055\u308c\u305f\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\n        int targetCellVal = board[x,y];\n        if (targetCellVal == 0) {\n            return;\n        }\n\n        \/\/ \u79fb\u52d5\u65b9\u5411\u3092\u5143\u306b\u63a2\u7d22\u65b9\u5411\u306e\u30aa\u30d5\u30bb\u30c3\u30c8\u3092\u6c7a\u3081\u308b\n        int dx = 1;\n        int dy = 1;\n        switch ( dir ) {\n            case DIR.UP:    dx =  0; dy = -1; break;\n            case DIR.RIGHT: dx =  1; dy =  0; break;\n            case DIR.DOWN:  dx =  0; dy =  1; break;\n            case DIR.LEFT:  dx = -1; dy =  0; break;\n        }\n\n\n        \/\/ \u4f55\u304b\u306b\u3076\u3064\u304b\u308b\u307e\u3067\u63a2\u7d22\u3059\u308b\n        while (true) {\n            if (endX + dx < 0 || endY + dy < 0 || endX + dx >= BOARD_SIZE || endY + dy >= BOARD_SIZE) {\n                \/\/ \u58c1\u306b\u3076\u3064\u304b\u3063\u305f -> 1\u3064\u624b\u524d\u306e\u5834\u6240\u3067\u30b9\u30c8\u30c3\u30d7\n                isDuplicate = false;\n                break;\n            } else if (board[endX + dx, endY + dy] != 0) {\n                \/\/ \u4ed6\u306e\u30bb\u30eb\u306b\u3076\u3064\u304b\u3063\u305f\n                if (targetCellVal == board[endX + dx, endY + dy]) {\n                    \/\/ \u885d\u7a81\u5148\u304c\u540c\u3058\u5024\u3060\u3063\u305f\u3000-> \u91cd\u306d\u308b\n                    endX += dx;\n                    endY += dy;\n                    isDuplicate = true;\n                    break;\n                } else {\n                    \/\/ \u885d\u7a81\u5148\u304c\u7570\u306a\u308b\u5024\u3060\u3063\u305f\u3000-> 1\u3064\u624b\u524d\u306e\u5834\u6240\u3067\u30b9\u30c8\u30c3\u30d7\n                    isDuplicate = false;\n                    break;\n                }\n            } else {\n                \/\/ \u4f55\u306b\u3082\u3076\u3064\u304b\u3089\u306a\u304b\u3063\u305f -> \u3055\u3089\u306b\u6b21\u306e\u4f4d\u7f6e\u3092\u30c1\u30a7\u30c3\u30af\n                endX += dx;\n                endY += dy;\n                continue;\n            }               \n        }\n        \/\/log( \"\u30bb\u30eb\u306e\u79fb\u52d5\u3092\u884c\u3044\u307e\u3059 [\" + x + \", \" + y + \"] -> [\" + endX + \", \" + endY + \"] dup=\" + isDuplicate );\n    }\n\n    \/\/*********************************************************************\n    \/\/\/ <summary> \u30c7\u30d0\u30c3\u30b0\u30ed\u30b0\u3092\u51fa\u529b\u3059\u308b\n    \/\/\/ <\/summary>\n    \/\/\/ <param name=\"message\"><\/param>\n    \/\/*********************************************************************\n    private void log(string message) {\n        Debug.WriteLine( message );\n    }\n}\n<\/pre>\n<br \/>\n<br \/>\n\u6b21\u56de\u306f\u3001\u30dc\u30fc\u30c9\u306b\u8868\u793a\u3055\u308c\u308b\u30bb\u30eb(\u6570\u5b57\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u99d2)\u306e\u30af\u30e9\u30b9\u7ba1\u7406\u3068\u3001\u63cf\u753b\u51e6\u7406\u3092\u898b\u76f4\u3059\u4e88\u5b9a\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u65e5\u306f\u3001\u524d\u56de\u306e\u4e88\u5b9a\u901a\u308a\u76e4\u9762\u306e\u7ba1\u7406\u3092\u5225\u30af\u30e9\u30b9\u306b\u5206\u3051\u3066\u307f\u307e\u3057\u305f\u3002 \u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u3092\u884c\u3063\u305f\u3060\u3051\u306a\u306e\u3067\u3001\u524d\u56de\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u3067\u304d\u308b\u3053\u3068\u306f\u5168\u304f\u540c\u3058\u3067\u3059\u3002 \u307e\u305a\u306f\u3001\u753b\u9762\u3092\u7ba1\u7406\u3057\u3066\u3044\u308bForm1.cs\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002 \u76e4\u9762\u7ba1\u7406\u3092BoardManager\u306b\u9003\u304c\u3057\u305f\u306e\u3067\u3001\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u306b\u306a\u308a\u307e\u3057\u305f\u3002 using System; using System.Collections.Generic; using System.Data; using System.Windows.Forms; namespace Mock2048 { public partial class Form1 : Form { BoardMa\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[5],"tags":[188],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":6778,"url":"http:\/\/nanoappli.com\/blog\/archives\/6778","url_meta":{"origin":6807,"position":0},"title":"C#\u30672048\u30b2\u30fc\u30e0\u306e\u30af\u30ed\u30fc\u30f3\u3092\u4f5c\u308b[\u305d\u306e1]","date":"2016\u5e741\u670821\u65e5","format":false,"excerpt":"\u3053\u308c\u304b\u3089\u52c9\u5f37\u3092\u304b\u306d\u3066\u30012048\u3068\u3044\u3046\u30b2\u30fc\u30e0\u306e\u30af\u30ed\u30fc\u30f3\u3092WinForm\u3067\u4f5c\u3063\u3066\u307f\u3088\u3046\u3068\u601d\u3044\u307e\u3059\u3002 20\u2026","rel":"","context":"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/nanoappli.com\/blog\/wp-content\/uploads\/2016\/01\/20160121_1-311x500.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":6798,"url":"http:\/\/nanoappli.com\/blog\/archives\/6798","url_meta":{"origin":6807,"position":1},"title":"C#\u30672048\u30b2\u30fc\u30e0\u306e\u30af\u30ed\u30fc\u30f3\u3092\u4f5c\u308b[\u305d\u306e2]","date":"2016\u5e741\u670827\u65e5","format":false,"excerpt":"\u524d\u56de\u306f\u3001\u4e0a\u30ad\u30fc\u3092\u62bc\u3057\u305f\u3068\u304d\u306e\u307f\u306e\u51e6\u7406\u3092\u66f8\u3044\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u4e0a\u4e0b\u5de6\u53f3\u306e\u30ad\u30fc\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u3053\u308c\u306b\u4f34\u3063\u3066\u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6814,"url":"http:\/\/nanoappli.com\/blog\/archives\/6814","url_meta":{"origin":6807,"position":2},"title":"C#\u30672048\u30b2\u30fc\u30e0\u306e\u30af\u30ed\u30fc\u30f3\u3092\u4f5c\u308b[\u305d\u306e3]","date":"2016\u5e741\u670828\u65e5","format":false,"excerpt":"\u4eca\u56de\u306f\u3001\u30b2\u30fc\u30e0\u30b5\u30a4\u30af\u30eb\u306e\u4f5c\u6210\u3092\u884c\u3044\u307e\u3057\u305f\u3002 \u4ee5\u4e0b\u306e\u7d30\u3005\u3068\u3057\u305f\u51e6\u7406\u3092\u8ffd\u52a0\u3057\u30011\u56de\u5206\u306e\u30b2\u30fc\u30e0\u958b\u59cb->\u30d7\u30ec\u2026","rel":"","context":"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6875,"url":"http:\/\/nanoappli.com\/blog\/archives\/6875","url_meta":{"origin":6807,"position":3},"title":"C#\u30672048\u30b2\u30fc\u30e0\u306e\u30af\u30ed\u30fc\u30f3\u3092\u4f5c\u308b[\u305d\u306e5]","date":"2016\u5e741\u670831\u65e5","format":false,"excerpt":"\u4eca\u56de\u306f\u3001\u4e88\u5b9a\u901a\u308a\u76e4\u9762\u306b\u8868\u793a\u3055\u305b\u308b\u99d2(\u30bb\u30eb)\u3092\u7ba1\u7406\u3059\u308b\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u3053\u308c\u307e\u3067\u306e\u30b2\u30fc\u30e0\u30eb\u30fc\u30eb\u4f5c\u6210\u2026","rel":"","context":"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/nanoappli.com\/blog\/wp-content\/uploads\/2016\/01\/20150131_1.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":6865,"url":"http:\/\/nanoappli.com\/blog\/archives\/6865","url_meta":{"origin":6807,"position":4},"title":"C#\u30672048\u30b2\u30fc\u30e0\u306e\u30af\u30ed\u30fc\u30f3\u3092\u4f5c\u308b[\u305d\u306e6]","date":"2016\u5e742\u67085\u65e5","format":false,"excerpt":"\u4eca\u56de\u306f\u3001\u524d\u56de\u306b\u4f5c\u3063\u305f\u306e\u30bb\u30eb\u306e\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u51e6\u7406\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002 \u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u3055\u305b\u308b\u3068\u3044\u3046\u3053\u3068\u306f\u3001\u5404\u2026","rel":"","context":"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/nanoappli.com\/blog\/wp-content\/uploads\/2016\/02\/20160204_1.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":939,"url":"http:\/\/nanoappli.com\/blog\/archives\/939","url_meta":{"origin":6807,"position":5},"title":"[WordPress]\u4eca\u6708\u306e\u6295\u7a3f\u6570\u3092\u53d6\u5f97\u3057\u3066\u8868\u793a\u3055\u305b\u308b","date":"2012\u5e741\u670830\u65e5","format":false,"excerpt":"WordPress\u3067\u3001\u5f53\u6708\u306e\u6295\u7a3f\u6570\u3092\u53d6\u5f97\u3057\u3066\u753b\u9762\u306b\u8868\u793a\u3055\u305b\u3066\u307f\u307e\u3057\u305f\u3002 \u3061\u3087\u3063\u3068\u30c6\u30b9\u30c8\u3057\u3066\u307f\u305f\u3068\u3053\u308d\u2026","rel":"","context":"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/nanoappli.com\/blog\/wp-content\/uploads\/20120130_04.jpg?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/posts\/6807"}],"collection":[{"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/comments?post=6807"}],"version-history":[{"count":4,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/posts\/6807\/revisions"}],"predecessor-version":[{"id":6832,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/posts\/6807\/revisions\/6832"}],"wp:attachment":[{"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/media?parent=6807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/categories?post=6807"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nanoappli.com\/blog\/wp-json\/wp\/v2\/tags?post=6807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}