title: Python Problem: TypeError: __init__() missing 1 required positional argument: 'brett'
body: <p>I'm new to Python and i'm trying to programm a chessboard. I followed the steps by a Professor and now i want to implement the Possibility to get the Board(Where the pieces stand) from serial input (Arduino). Somehow im getting more and more Errors.</p>
  <p>After i looked up for all, i cannot solve this one:</p>
  <blockquote>
  <p>TypeError: <strong>init</strong>() missing 1 required positional argument: 'brett'.</p>
  </blockquote>
  <p>Here is my Code for the Board:</p>
  <pre class="lang-py prettyprint-override"><code>import serial
  
  class GameState:
  
      def __init__(self,brett):
  
          self.Board = [brett]
          self.moveFunctions = {&quot;p&quot;: self.getPawnMoves, &quot;R&quot;: self.getRookMoves, &quot;N&quot;: self.getKnightMoves,
                                &quot;B&quot;: self.getBishopMoves, &quot;Q&quot;: self.getQueenMoves, &quot;K&quot;: self.getKingMoves}
          self.white_to_move = True
          self.move_log = []
          self.white_king_location = (7, 4)
          self.black_king_location = (0, 4)
          self.checkmate = False
          self.stalemate = False
          self.in_check = False
          self.pins = []
          self.checks = []
          self.enpassant_possible = ()  # coordinates for the square where en-passant capture is possible
          self.enpassant_possible_log = [self.enpassant_possible]
          self.current_castling_rights = CastleRights(True, True, True, True)
          self.castle_rights_log = [CastleRights(self.current_castling_rights.wks, self.current_castling_rights.bks,
                                                 self.current_castling_rights.wqs, self.current_castling_rights.bqs)]
  
      def brett(self):
          if __name__ == '__main__':
              ser = serial.Serial('/dev/ttyACM0', 9600, timeout=1)
              ser.flush()
              while True:
                  if ser.in_waiting &gt; 0:
                      brett = ser.readline().decode('utf-8').rstrip()
                      print(brett)
          else:
              brett = ['bR', 'bN', 'bB', 'bQ', 'bK', 'bB', 'bN', 'bR'],['bp'] * 8,['--'] * 8, ['--'] * 8,['--'] * 8,['--'] * 8,['wp'] * 8,['wR', 'wN', 'wB', 'wQ', 'wK', 'wB', 'wN', 'wR']
              print(brett)
  </code></pre>
  <p>and my main for the actualy Programm:</p>
  <pre class="lang-py prettyprint-override"><code>def main():
      &quot;&quot;&quot;
      The main driver for our code.
      This will handle user input and updating the graphics.
      &quot;&quot;&quot;
      p.init()
      screen = p.display.set_mode((BOARD_WIDTH + MOVE_LOG_PANEL_WIDTH, BOARD_HEIGHT))
      clock = p.time.Clock()
      screen.fill(p.Color(&quot;white&quot;))
      game_state = ChessEngine.GameState()
      valid_moves = game_state.getValidMoves()
      move_made = False  # flag variable for when a move is made
      animate = False  # flag variable for when we should animate a move
      loadImages()  # do this only once before while loop
  
      running = True
      square_selected = ()  # no square is selected initially, this will keep track of the last click of the user (tuple(row,col))
      player_clicks = []  # this will keep track of player clicks (two tuples)
      game_over = False
  
      white_did_check = &quot;&quot;
      black_did_check = &quot;&quot;
      last_move_printed = False
      moves_list = []
      move_log_font = p.font.SysFont(&quot;Arial&quot;, 14, False, False)
  
      turn = 1
  
      player_one = True  # if a human is playing white, then this will be True, else False
      player_two = False  # if a hyman is playing white, then this will be True, else False
  </code></pre>
  <p>it tells me the Problem is in game_state = ChessEngine.GameState() but i dont know what to put there.
  Thank you for your help</p>