예제 #1
0
        //draws full Board
        public void Draw_Board(Graphics l)
        {
            Board board = game.GetBoard();

            //draw BG for playing Area
            Draw_Background(l);

            //Draws next Peace
            draw_nextPiece(game.GetNextPiece(), l);

            //displays Score
            display_score(game.GetScore(), l);
            //Lines to Clear
            display_linestoClear(game.GetLines(), l);
            //Draw Current Level
            display_Level(game.GetLevel(), l);

            //Draws each Piece int the Board
            foreach (KeyValuePair <Piece, char> position in board)
            {
                if (position.Key.Item1 < 0 || position.Key.Item1 > 9 || position.Key.Item2 < 0 || position.Key.Item2 > 19)
                {
                    continue;
                }

                Draw_Piece(position.Key.Item1, position.Key.Item2, board[position.Key], 30, l);
            }
        }