Make the game board its own widget.

This commit is contained in:
2026-02-24 11:23:53 -07:00
parent 5ec7fb02db
commit 27fde6474e

View File

@@ -9,9 +9,16 @@ class MainApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: Scaffold(
body: Row(
return const MaterialApp(home: Scaffold(body: GameBoard()));
}
}
class GameBoard extends StatelessWidget {
const GameBoard({super.key});
@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
@@ -52,8 +59,6 @@ class MainApp extends StatelessWidget {
// Player 2 Goal
Column(children: [Center(child: Text(" P2 "))]),
],
),
),
);
}
}