From 58849edeeb73b9b816cb7e45412954fb47bd0534 Mon Sep 17 00:00:00 2001 From: ReimarPB Date: Mon, 13 Mar 2023 13:59:49 +0100 Subject: [PATCH] Initial commit --- TicTacToe.sln | 25 ++++++++++++++++ tictactoe/App.xaml | 16 ++++++++++ tictactoe/App.xaml.cs | 17 +++++++++++ tictactoe/AssemblyInfo.cs | 10 +++++++ tictactoe/MainWindow.xaml | 52 +++++++++++++++++++++++++++++++++ tictactoe/MainWindow.xaml.cs | 28 ++++++++++++++++++ tictactoe/TicTacToe.csproj | 14 +++++++++ tictactoe/TicTacToe.csproj.user | 14 +++++++++ tictactoe/TicTacToeViewModel.cs | 26 +++++++++++++++++ 9 files changed, 202 insertions(+) create mode 100644 TicTacToe.sln create mode 100644 tictactoe/App.xaml create mode 100644 tictactoe/App.xaml.cs create mode 100644 tictactoe/AssemblyInfo.cs create mode 100644 tictactoe/MainWindow.xaml create mode 100644 tictactoe/MainWindow.xaml.cs create mode 100644 tictactoe/TicTacToe.csproj create mode 100644 tictactoe/TicTacToe.csproj.user create mode 100644 tictactoe/TicTacToeViewModel.cs diff --git a/TicTacToe.sln b/TicTacToe.sln new file mode 100644 index 0000000..5af215d --- /dev/null +++ b/TicTacToe.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33103.184 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TicTacToe", "TicTacToe\TicTacToe.csproj", "{AB94BFE4-3BA9-4275-885A-BEA73ABEAFED}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AB94BFE4-3BA9-4275-885A-BEA73ABEAFED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AB94BFE4-3BA9-4275-885A-BEA73ABEAFED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AB94BFE4-3BA9-4275-885A-BEA73ABEAFED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AB94BFE4-3BA9-4275-885A-BEA73ABEAFED}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C7E0F3E0-6FB2-4B97-9BB6-F9E283C93D25} + EndGlobalSection +EndGlobal diff --git a/tictactoe/App.xaml b/tictactoe/App.xaml new file mode 100644 index 0000000..3e5aaf9 --- /dev/null +++ b/tictactoe/App.xaml @@ -0,0 +1,16 @@ + + + + + + + diff --git a/tictactoe/App.xaml.cs b/tictactoe/App.xaml.cs new file mode 100644 index 0000000..99fd264 --- /dev/null +++ b/tictactoe/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace TicTacToe +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/tictactoe/AssemblyInfo.cs b/tictactoe/AssemblyInfo.cs new file mode 100644 index 0000000..8b5504e --- /dev/null +++ b/tictactoe/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/tictactoe/MainWindow.xaml b/tictactoe/MainWindow.xaml new file mode 100644 index 0000000..3b1a085 --- /dev/null +++ b/tictactoe/MainWindow.xaml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tictactoe/MainWindow.xaml.cs b/tictactoe/MainWindow.xaml.cs new file mode 100644 index 0000000..11ec5a2 --- /dev/null +++ b/tictactoe/MainWindow.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace TicTacToe +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git a/tictactoe/TicTacToe.csproj b/tictactoe/TicTacToe.csproj new file mode 100644 index 0000000..2623758 --- /dev/null +++ b/tictactoe/TicTacToe.csproj @@ -0,0 +1,14 @@ + + + + WinExe + net7.0-windows + enable + true + + + + + + + diff --git a/tictactoe/TicTacToe.csproj.user b/tictactoe/TicTacToe.csproj.user new file mode 100644 index 0000000..644b0a6 --- /dev/null +++ b/tictactoe/TicTacToe.csproj.user @@ -0,0 +1,14 @@ + + + + + + Designer + + + + + Designer + + + \ No newline at end of file diff --git a/tictactoe/TicTacToeViewModel.cs b/tictactoe/TicTacToeViewModel.cs new file mode 100644 index 0000000..f8b7a50 --- /dev/null +++ b/tictactoe/TicTacToeViewModel.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CommunityToolkit.Mvvm.ComponentModel; + +namespace TicTacToe +{ + partial class TicTacToeViewModel : ObservableObject + { + [ObservableProperty] + char[][] grid = new char[][] { + new char[] { ' ', ' ', ' ' }, + new char[] { ' ', ' ', ' ' }, + new char[] { ' ', ' ', ' ' }, + }; + + char currentTurn = 'O'; + + public TicTacToeViewModel() + { + + } + } +}