diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..9b956f99
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,133 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.sln.docstates
+
+# Build results
+
+[Dd]ebug/
+[Rr]elease/
+x64/
+[Bb]in/
+[Oo]bj/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.log
+*.svclog
+*.scc
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opensdf
+*.sdf
+*.cachefile
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.Publish.xml
+*.pubxml
+*.azurePubxml
+
+# NuGet Packages Directory
+## TODO: If you have NuGet Package Restore enabled, uncomment the next line
+packages/
+## TODO: If the tool you use requires repositories.config, also uncomment the next line
+!packages/repositories.config
+
+# Windows Azure Build Output
+csx/
+*.build.csdef
+
+# Windows Store app package directory
+AppPackages/
+
+# Others
+sql/
+*.Cache
+ClientBin/
+[Ss]tyle[Cc]op.*
+![Ss]tyle[Cc]op.targets
+~$*
+*~
+*.dbmdl
+*.[Pp]ublish.xml
+
+*.publishsettings
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file to a newer
+# Visual Studio version. Backup files are not needed, because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+App_Data/*.mdf
+App_Data/*.ldf
+
+# =========================
+# Windows detritus
+# =========================
+
+# Windows image file caches
+Thumbs.db
+ehthumbs.db
+
+# Folder config file
+Desktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Mac desktop service store files
+.DS_Store
+
+_NCrunch*
\ No newline at end of file
diff --git a/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/.suo b/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/.suo
new file mode 100644
index 00000000..884f8158
Binary files /dev/null and b/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/.suo differ
diff --git a/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/Server/sqlite3/db.lock b/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/Server/sqlite3/db.lock
new file mode 100644
index 00000000..e69de29b
diff --git a/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/Server/sqlite3/storage.ide b/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/Server/sqlite3/storage.ide
new file mode 100644
index 00000000..8385a02c
Binary files /dev/null and b/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/Server/sqlite3/storage.ide differ
diff --git a/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/sqlite3/db.lock b/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/sqlite3/db.lock
new file mode 100644
index 00000000..e69de29b
diff --git a/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/sqlite3/storage.ide b/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/sqlite3/storage.ide
new file mode 100644
index 00000000..4aaae3e6
Binary files /dev/null and b/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/sqlite3/storage.ide differ
diff --git a/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/sqlite3/storage.ide-shm b/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/sqlite3/storage.ide-shm
new file mode 100644
index 00000000..fe72db5a
Binary files /dev/null and b/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/sqlite3/storage.ide-shm differ
diff --git a/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/sqlite3/storage.ide-wal b/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/sqlite3/storage.ide-wal
new file mode 100644
index 00000000..25465402
Binary files /dev/null and b/ClientServerMultithreading/.vs/ClientServerMultithreading/v15/sqlite3/storage.ide-wal differ
diff --git a/ClientServerMultithreading/.vs/ProjectSettings.json b/ClientServerMultithreading/.vs/ProjectSettings.json
new file mode 100644
index 00000000..f8b48885
--- /dev/null
+++ b/ClientServerMultithreading/.vs/ProjectSettings.json
@@ -0,0 +1,3 @@
+{
+ "CurrentProjectSetting": null
+}
\ No newline at end of file
diff --git a/ClientServerMultithreading/.vs/VSWorkspaceState.json b/ClientServerMultithreading/.vs/VSWorkspaceState.json
new file mode 100644
index 00000000..e7796692
--- /dev/null
+++ b/ClientServerMultithreading/.vs/VSWorkspaceState.json
@@ -0,0 +1,9 @@
+{
+ "ExpandedNodes": [
+ "",
+ "\\ClientApplication",
+ "\\ServerApplication"
+ ],
+ "SelectedNode": "\\ClientApplication\\Program.cs",
+ "PreviewInSolutionExplorer": false
+}
\ No newline at end of file
diff --git a/ClientServerMultithreading/.vs/slnx.sqlite b/ClientServerMultithreading/.vs/slnx.sqlite
new file mode 100644
index 00000000..6953fa3b
Binary files /dev/null and b/ClientServerMultithreading/.vs/slnx.sqlite differ
diff --git a/ClientServerMultithreading/ClientApplication/App.config b/ClientServerMultithreading/ClientApplication/App.config
new file mode 100644
index 00000000..88fa4027
--- /dev/null
+++ b/ClientServerMultithreading/ClientApplication/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ClientServerMultithreading/ClientApplication/ClientApplication.csproj b/ClientServerMultithreading/ClientApplication/ClientApplication.csproj
new file mode 100644
index 00000000..768c18c2
--- /dev/null
+++ b/ClientServerMultithreading/ClientApplication/ClientApplication.csproj
@@ -0,0 +1,63 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {28D2DD87-9A8B-476E-A467-1E70D696FD3D}
+ Exe
+ Properties
+ ClientApplication
+ ClientApplication
+ v4.5.2
+ 512
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\NetworkCommsDotNetComplete.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ClientServerMultithreading/ClientApplication/Program.cs b/ClientServerMultithreading/ClientApplication/Program.cs
new file mode 100644
index 00000000..be4b03e4
--- /dev/null
+++ b/ClientServerMultithreading/ClientApplication/Program.cs
@@ -0,0 +1,115 @@
+
+// Using Directive List
+using System;
+using System.IO;
+using System.Net;
+using System.Net.Sockets;
+
+// Creating The public class "EchoClient"
+public class EchoClient {
+
+ // MAXIMUM 3 CLIENTS SUPPORTED
+
+ // Calling static variables
+ static bool selectedName = false;
+ static bool joinedLobby = false;
+ static int lobbyNumber = 0;
+ static String clientName = "";
+ static bool startingGame = false;
+
+
+ public static void Main() {
+ try { // try-catch Tries To Catch Exceptions And Prints It Out If Something Goes Wrong In The Program
+ TcpClient client = new TcpClient("127.0.0.1", 10000); // Client IP and port, 127.0.0.1 is localhost
+ StreamReader reader = new StreamReader(client.GetStream()); // For Reading Data From The Server
+ StreamWriter writer = new StreamWriter(client.GetStream()); // For Writing Data To The Server
+ String s = String.Empty; // String s Is Used To Temporarily Store What Is Input Into The Console
+ while (!s.Equals("Exit")) {
+ if (!selectedName) {
+ Console.WriteLine("Connected to server! \n"); // Outputs Message To Console
+ Console.Write("Hello There! Please select a unique screen name: "); // Outputs Message To Console
+ clientName = Console.ReadLine(); // Write The Screen Name You Want
+ s = "++"+clientName; // Store It In The String - the ++ is added before it's sent so the server can identify it later
+
+ selectedName = true;
+ while (clientName.Length < 2) { // String Length Need To Be Larger Than 2
+ Console.WriteLine("Your unique screen name needs to be longer. \n");
+ Console.Write("Hello There! Please select a unique screen name: ");
+ clientName = Console.ReadLine();
+ s = "++"+clientName;
+ }
+ } else if (selectedName && !joinedLobby && !startingGame) { // If You Selected A Name But Did Not Join And/Or Start A Game Yet
+ Console.WriteLine("Here are your options: \n");
+ Console.WriteLine("lobbylist: View list of lobbies");
+ Console.WriteLine("open 1-3: create new lobby");
+ Console.WriteLine("close 1-3: close lobby");
+ Console.WriteLine("join 1-3: join lobby \n");
+
+ s = clientName+"_"+Console.ReadLine(); //the client name and an underscore is added before it's sent so the server can identify it
+ }
+
+
+ if (joinedLobby && !startingGame) { // If You Joined A Lobby But Did Not Start The Game Yet
+ Console.WriteLine("Waiting for game to start.");
+ Console.WriteLine("You are in lobby " + lobbyNumber);
+ Console.WriteLine("Type leave to leave the lobby.");
+ Console.WriteLine("Press Enter to update the state of the lobby. \n");
+ s = clientName+"_"+Console.ReadLine(); //the client name and an underscore is added before it's sent so the server can identify it
+ }
+
+
+ if (startingGame) { // If A Game Has Started
+ Console.WriteLine("Starting Game! Press enter to see who won! \n \n");
+ s = Console.ReadLine()+"xox9_"; //random numbers xox9_ added at the end so the server can identify it
+ //Console.WriteLine("Sending this input: " + s);
+ }
+
+ Console.WriteLine();
+ writer.WriteLine(s); // Sends Input To The Server
+ writer.Flush(); // Flushes The Streamreader
+
+ String server_string = reader.ReadLine(); // Streamreader To Receive Data/Information From The Server
+ Console.WriteLine("From Server: " + server_string + "\n");
+
+ /*
+ Below Code Checks Which Lobby The Player Is Connected To,
+ How Many Other Players Are Connected And If The Game Is Ready To Start
+ It Receives Strings From The Server According To Which Other Players Joined The Game etc.
+ This Happens via The String server_string streamreader (because the server can only send one line at a time, we make the clients print the code)
+ */
+
+ if (server_string == "Joined lobby 1 (1)" || server_string == "Joined lobby 1 (2)") {
+ joinedLobby = true;
+ lobbyNumber = 1;
+ } else if (server_string == "Joined lobby 1 (3)" || server_string == "3 Players connected to lobby 1! Ready to start game!") {
+ joinedLobby = true;
+ lobbyNumber = 1;
+ startingGame = true;
+ }
+
+ if (server_string == "Joined lobby 2 (1)" || server_string == "Joined lobby 2 (2)") {
+ joinedLobby = true;
+ lobbyNumber = 2;
+ } else if (server_string == "Joined lobby 2 (3)" || server_string == "3 Players connected to lobby 2! Ready to start game!") {
+ joinedLobby = true;
+ lobbyNumber = 2;
+ startingGame = true;
+ }
+
+ if (server_string == "Joined lobby 3 (1)" || server_string == "Joined lobby 3 (2)") {
+ joinedLobby = true;
+ lobbyNumber = 3;
+ } else if (server_string == "Joined lobby 3 (3)" || server_string == "3 Players connected to lobby 3! Ready to start game!") {
+ joinedLobby = true;
+ lobbyNumber = 3;
+ startingGame = true;
+ }
+ }
+ reader.Close(); // Called To Close Reader After The Game Has Ended
+ writer.Close(); // Called To Close Writer After The Game Has Ended
+ client.Close(); // Called To Close The Client After The Game Has Ended
+ } catch (Exception e) { // If There Are Any Errors ...
+ Console.WriteLine(e); // Output Them To The Console
+ }
+ }
+}
\ No newline at end of file
diff --git a/ClientServerMultithreading/ClientApplication/Properties/AssemblyInfo.cs b/ClientServerMultithreading/ClientApplication/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..644a4c77
--- /dev/null
+++ b/ClientServerMultithreading/ClientApplication/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("ClientApplication")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("ClientApplication")]
+[assembly: AssemblyCopyright("Copyright © 2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("28d2dd87-9a8b-476e-a467-1e70d696fd3d")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/ClientServerMultithreading/ClientApplication/bin/Debug/ClientApplication.exe b/ClientServerMultithreading/ClientApplication/bin/Debug/ClientApplication.exe
new file mode 100644
index 00000000..3b6d7e16
Binary files /dev/null and b/ClientServerMultithreading/ClientApplication/bin/Debug/ClientApplication.exe differ
diff --git a/ClientServerMultithreading/ClientApplication/bin/Debug/ClientApplication.exe.config b/ClientServerMultithreading/ClientApplication/bin/Debug/ClientApplication.exe.config
new file mode 100644
index 00000000..88fa4027
--- /dev/null
+++ b/ClientServerMultithreading/ClientApplication/bin/Debug/ClientApplication.exe.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ClientServerMultithreading/ClientApplication/bin/Debug/ClientApplication.pdb b/ClientServerMultithreading/ClientApplication/bin/Debug/ClientApplication.pdb
new file mode 100644
index 00000000..46d7f813
Binary files /dev/null and b/ClientServerMultithreading/ClientApplication/bin/Debug/ClientApplication.pdb differ
diff --git a/ClientServerMultithreading/ClientApplication/bin/Debug/ClientApplication.vshost.exe b/ClientServerMultithreading/ClientApplication/bin/Debug/ClientApplication.vshost.exe
new file mode 100644
index 00000000..681ab771
Binary files /dev/null and b/ClientServerMultithreading/ClientApplication/bin/Debug/ClientApplication.vshost.exe differ
diff --git a/ClientServerMultithreading/ClientApplication/bin/Debug/ClientApplication.vshost.exe.config b/ClientServerMultithreading/ClientApplication/bin/Debug/ClientApplication.vshost.exe.config
new file mode 100644
index 00000000..88fa4027
--- /dev/null
+++ b/ClientServerMultithreading/ClientApplication/bin/Debug/ClientApplication.vshost.exe.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ClientServerMultithreading/ClientApplication/bin/Debug/ClientApplication.vshost.exe.manifest b/ClientServerMultithreading/ClientApplication/bin/Debug/ClientApplication.vshost.exe.manifest
new file mode 100644
index 00000000..061c9ca9
--- /dev/null
+++ b/ClientServerMultithreading/ClientApplication/bin/Debug/ClientApplication.vshost.exe.manifest
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ClientServerMultithreading/ClientApplication/bin/Debug/NetworkCommsDotNetComplete.dll b/ClientServerMultithreading/ClientApplication/bin/Debug/NetworkCommsDotNetComplete.dll
new file mode 100644
index 00000000..06c269e3
Binary files /dev/null and b/ClientServerMultithreading/ClientApplication/bin/Debug/NetworkCommsDotNetComplete.dll differ
diff --git a/ClientServerMultithreading/ClientApplication/obj/Debug/ClientApplication.csproj.CoreCompileInputs.cache b/ClientServerMultithreading/ClientApplication/obj/Debug/ClientApplication.csproj.CoreCompileInputs.cache
new file mode 100644
index 00000000..19a82099
--- /dev/null
+++ b/ClientServerMultithreading/ClientApplication/obj/Debug/ClientApplication.csproj.CoreCompileInputs.cache
@@ -0,0 +1 @@
+ea830433a135dff0492f42c4fb4c6cfd63def9fb
diff --git a/ClientServerMultithreading/ClientApplication/obj/Debug/ClientApplication.csproj.FileListAbsolute.txt b/ClientServerMultithreading/ClientApplication/obj/Debug/ClientApplication.csproj.FileListAbsolute.txt
new file mode 100644
index 00000000..70c82735
--- /dev/null
+++ b/ClientServerMultithreading/ClientApplication/obj/Debug/ClientApplication.csproj.FileListAbsolute.txt
@@ -0,0 +1,35 @@
+c:\users\alexa\documents\visual studio 2015\Projects\ClientServerApplication\ClientApplication\bin\Debug\ClientApplication.exe.config
+c:\users\alexa\documents\visual studio 2015\Projects\ClientServerApplication\ClientApplication\bin\Debug\ClientApplication.exe
+c:\users\alexa\documents\visual studio 2015\Projects\ClientServerApplication\ClientApplication\bin\Debug\ClientApplication.pdb
+c:\users\alexa\documents\visual studio 2015\Projects\ClientServerApplication\ClientApplication\bin\Debug\NetworkCommsDotNetComplete.dll
+c:\users\alexa\documents\visual studio 2015\Projects\ClientServerApplication\ClientApplication\obj\Debug\ClientApplication.csprojResolveAssemblyReference.cache
+c:\users\alexa\documents\visual studio 2015\Projects\ClientServerApplication\ClientApplication\obj\Debug\ClientApplication.exe
+c:\users\alexa\documents\visual studio 2015\Projects\ClientServerApplication\ClientApplication\obj\Debug\ClientApplication.pdb
+C:\Users\alexa\Documents\visual studio 2015\Projects\ClientServerMultithreading\ClientApplication\bin\Debug\ClientApplication.exe.config
+C:\Users\alexa\Documents\visual studio 2015\Projects\ClientServerMultithreading\ClientApplication\obj\Debug\ClientApplication.exe
+C:\Users\alexa\Documents\visual studio 2015\Projects\ClientServerMultithreading\ClientApplication\obj\Debug\ClientApplication.pdb
+C:\Users\alexa\Documents\visual studio 2015\Projects\ClientServerMultithreading\ClientApplication\bin\Debug\ClientApplication.exe
+C:\Users\alexa\Documents\visual studio 2015\Projects\ClientServerMultithreading\ClientApplication\bin\Debug\ClientApplication.pdb
+C:\Users\alexa\Documents\visual studio 2015\Projects\ClientServerMultithreading\ClientApplication\bin\Debug\NetworkCommsDotNetComplete.dll
+C:\Users\alexa\Documents\visual studio 2015\Projects\ClientServerMultithreading\ClientApplication\obj\Debug\ClientApplication.csprojResolveAssemblyReference.cache
+C:\Github\pcss_group10\EXTRA\ClientServerMultithreading\ClientApplication\bin\Debug\ClientApplication.exe.config
+C:\Github\pcss_group10\EXTRA\ClientServerMultithreading\ClientApplication\bin\Debug\ClientApplication.exe
+C:\Github\pcss_group10\EXTRA\ClientServerMultithreading\ClientApplication\bin\Debug\ClientApplication.pdb
+C:\Github\pcss_group10\EXTRA\ClientServerMultithreading\ClientApplication\obj\Debug\ClientApplication.csprojResolveAssemblyReference.cache
+C:\Github\pcss_group10\EXTRA\ClientServerMultithreading\ClientApplication\obj\Debug\ClientApplication.csproj.CoreCompileInputs.cache
+C:\Github\pcss_group10\EXTRA\ClientServerMultithreading\ClientApplication\obj\Debug\ClientApplication.exe
+C:\Github\pcss_group10\EXTRA\ClientServerMultithreading\ClientApplication\obj\Debug\ClientApplication.pdb
+C:\Github\pcss_group10\ClientServerMultithreading\ClientApplication\bin\Debug\ClientApplication.exe.config
+C:\Github\pcss_group10\ClientServerMultithreading\ClientApplication\bin\Debug\ClientApplication.exe
+C:\Github\pcss_group10\ClientServerMultithreading\ClientApplication\bin\Debug\ClientApplication.pdb
+C:\Github\pcss_group10\ClientServerMultithreading\ClientApplication\obj\Debug\ClientApplication.csprojResolveAssemblyReference.cache
+C:\Github\pcss_group10\ClientServerMultithreading\ClientApplication\obj\Debug\ClientApplication.csproj.CoreCompileInputs.cache
+C:\Github\pcss_group10\ClientServerMultithreading\ClientApplication\obj\Debug\ClientApplication.exe
+C:\Github\pcss_group10\ClientServerMultithreading\ClientApplication\obj\Debug\ClientApplication.pdb
+C:\Users\gta4w\Documents\GitHub\pcss_group10\ClientServerMultithreading\ClientApplication\bin\Debug\ClientApplication.exe.config
+C:\Users\gta4w\Documents\GitHub\pcss_group10\ClientServerMultithreading\ClientApplication\bin\Debug\ClientApplication.exe
+C:\Users\gta4w\Documents\GitHub\pcss_group10\ClientServerMultithreading\ClientApplication\bin\Debug\ClientApplication.pdb
+C:\Users\gta4w\Documents\GitHub\pcss_group10\ClientServerMultithreading\ClientApplication\obj\Debug\ClientApplication.csprojResolveAssemblyReference.cache
+C:\Users\gta4w\Documents\GitHub\pcss_group10\ClientServerMultithreading\ClientApplication\obj\Debug\ClientApplication.csproj.CoreCompileInputs.cache
+C:\Users\gta4w\Documents\GitHub\pcss_group10\ClientServerMultithreading\ClientApplication\obj\Debug\ClientApplication.exe
+C:\Users\gta4w\Documents\GitHub\pcss_group10\ClientServerMultithreading\ClientApplication\obj\Debug\ClientApplication.pdb
diff --git a/ClientServerMultithreading/ClientApplication/obj/Debug/ClientApplication.csprojResolveAssemblyReference.cache b/ClientServerMultithreading/ClientApplication/obj/Debug/ClientApplication.csprojResolveAssemblyReference.cache
new file mode 100644
index 00000000..e3b2226f
Binary files /dev/null and b/ClientServerMultithreading/ClientApplication/obj/Debug/ClientApplication.csprojResolveAssemblyReference.cache differ
diff --git a/ClientServerMultithreading/ClientApplication/obj/Debug/ClientApplication.exe b/ClientServerMultithreading/ClientApplication/obj/Debug/ClientApplication.exe
new file mode 100644
index 00000000..3b6d7e16
Binary files /dev/null and b/ClientServerMultithreading/ClientApplication/obj/Debug/ClientApplication.exe differ
diff --git a/ClientServerMultithreading/ClientApplication/obj/Debug/ClientApplication.pdb b/ClientServerMultithreading/ClientApplication/obj/Debug/ClientApplication.pdb
new file mode 100644
index 00000000..46d7f813
Binary files /dev/null and b/ClientServerMultithreading/ClientApplication/obj/Debug/ClientApplication.pdb differ
diff --git a/ClientServerMultithreading/ClientApplication/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ClientServerMultithreading/ClientApplication/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
new file mode 100644
index 00000000..606314ec
Binary files /dev/null and b/ClientServerMultithreading/ClientApplication/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/ClientServerMultithreading/ClientApplication/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/ClientServerMultithreading/ClientApplication/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100644
index 00000000..e69de29b
diff --git a/ClientServerMultithreading/ClientApplication/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/ClientServerMultithreading/ClientApplication/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100644
index 00000000..e69de29b
diff --git a/ClientServerMultithreading/ClientApplication/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/ClientServerMultithreading/ClientApplication/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100644
index 00000000..e69de29b
diff --git a/ClientServerMultithreading/ClientApplication/obj/Release/ClientApplication.csproj.CoreCompileInputs.cache b/ClientServerMultithreading/ClientApplication/obj/Release/ClientApplication.csproj.CoreCompileInputs.cache
new file mode 100644
index 00000000..4100c54c
--- /dev/null
+++ b/ClientServerMultithreading/ClientApplication/obj/Release/ClientApplication.csproj.CoreCompileInputs.cache
@@ -0,0 +1 @@
+729226d68d516d104ba715762463571b5205eefe
diff --git a/ClientServerMultithreading/ClientServerMultithreading.sln b/ClientServerMultithreading/ClientServerMultithreading.sln
new file mode 100644
index 00000000..eaeeee05
--- /dev/null
+++ b/ClientServerMultithreading/ClientServerMultithreading.sln
@@ -0,0 +1,34 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.25420.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClientApplication", "ClientApplication\ClientApplication.csproj", "{28D2DD87-9A8B-476E-A467-1E70D696FD3D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerApplication", "ServerApplication\ServerApplication.csproj", "{775F7933-E0D9-4971-AD5D-4FEE10FE2242}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClientApplication2", "ClientApplication2\ClientApplication2.csproj", "{5A4FC80D-4716-45CD-82D2-AEF529975734}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {28D2DD87-9A8B-476E-A467-1E70D696FD3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {28D2DD87-9A8B-476E-A467-1E70D696FD3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {28D2DD87-9A8B-476E-A467-1E70D696FD3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {28D2DD87-9A8B-476E-A467-1E70D696FD3D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {775F7933-E0D9-4971-AD5D-4FEE10FE2242}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {775F7933-E0D9-4971-AD5D-4FEE10FE2242}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {775F7933-E0D9-4971-AD5D-4FEE10FE2242}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {775F7933-E0D9-4971-AD5D-4FEE10FE2242}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5A4FC80D-4716-45CD-82D2-AEF529975734}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5A4FC80D-4716-45CD-82D2-AEF529975734}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5A4FC80D-4716-45CD-82D2-AEF529975734}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5A4FC80D-4716-45CD-82D2-AEF529975734}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ClientServerMultithreading/ServerApplication/App.config b/ClientServerMultithreading/ServerApplication/App.config
new file mode 100644
index 00000000..88fa4027
--- /dev/null
+++ b/ClientServerMultithreading/ServerApplication/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ClientServerMultithreading/ServerApplication/Program.cs b/ClientServerMultithreading/ServerApplication/Program.cs
new file mode 100644
index 00000000..8cdb7d72
--- /dev/null
+++ b/ClientServerMultithreading/ServerApplication/Program.cs
@@ -0,0 +1,509 @@
+
+// Using Directive List
+using System;
+using System.IO;
+using System.Net;
+using System.Net.Sockets;
+using System.Threading;
+
+
+// Creating The public class "MultiThreadedEchoServer
+public class MultiThreadedEchoServer {
+
+ // MAXIMUM 3 CLIENTS SUPPORTED
+
+ // Calling static variables
+
+ static bool foundRandom = false;
+
+ // 3 Integers Created To Give Space For 3 Players Later In The Code
+ static int x = 0;
+ static int y = 0;
+ static int z = 0;
+
+
+ // Array Variables For Storing Various Information About Players And Lobbies
+ static String[] playerNames = {"", "", ""};
+ static bool[] openLobbies = {false, false, false};
+ static int[] playersinlobby = {0, 0, 0};
+ static bool[] playerinlobby = {false, false, false};
+ static int[] tempLobby = {0, 0, 0};
+ static bool[] clientsConnected = {false, false, false};
+
+
+ private static void ProcessClientRequests(object argument) {
+
+ /*
+ * The Following Code Is Data/Information That Will Be Send To The Client
+ * To Make It Possible For The Client To Create/Join Lobbies.
+ */
+
+ TcpClient client = (TcpClient)argument; // Creating Tcp Object "client" From The class "TcpClient"
+ try { // try-catch Is Called To Catch Exceptions If Something Goes Wrong
+
+ StreamReader reader = new StreamReader(client.GetStream()); // StreamReader Takes Input From Client
+ StreamWriter writer = new StreamWriter(client.GetStream()); // StreamWriter Sends Output To Client
+ string s = String.Empty;
+ while (!(s = reader.ReadLine()).Equals("Exit") || (s == null)) { //if there is a message and it's not Exit, do everything in this while loop.
+
+ if (s[0] == '+' && s[1] == '+' && !clientsConnected[0]) { // if 0 clients connected
+ playerNames[0] = s; //player array entry 0 is set to the input
+ Console.WriteLine(playerNames[0] + " joined the server");
+ writer.WriteLine("Name selected: " + playerNames[0]);
+ clientsConnected[0] = true;
+ Console.WriteLine("clientsConnected[0]: " + clientsConnected[0] + "\n");
+ } else if (s[0] == '+' && s [1] == '+' && clientsConnected[0] && !clientsConnected[1]) { // if 1 client connected
+ playerNames[1] = s; //player array entry 2 is set to the input
+ Console.WriteLine(playerNames[1] + " joined the server");
+ writer.WriteLine("Name selected: " + playerNames[1]);
+ clientsConnected[1] = true;
+ Console.WriteLine("clientsConnected[1]: " + clientsConnected[1] + "\n");
+ } else if (s[0] == '+' && s[1] == '+' && clientsConnected[1]) { // if 2 clients connected
+ playerNames[2] = s; //player array entry 3 is set to the input
+ Console.WriteLine(playerNames[2] + " joined the server");
+ writer.WriteLine("Name selected: " + playerNames[2]);
+ clientsConnected[2] = true;
+ Console.WriteLine("clientsConnected[2]: " + clientsConnected[2] + "\n");
+ } else {
+ String j = string.Concat("++", s); //has some problems with s so turned it into j. dont know if this is still neccesary
+
+ if (j == (playerNames[0]+"_lobbylist")) { // if the input is lobbylist and sent by client1. To keep track of who wrote it, the client also sends their own name and an underscore here (see client code line 48)
+ Console.WriteLine(playerNames[0] + " Requested to see the lobby list");
+ writer.WriteLine("Lobby 1: " + (openLobbies[0]?"Open " + "(" + playersinlobby[0] + ")":"Closed ") +
+ " | Lobby 2: " + (openLobbies[1]?"Open " + "(" + playersinlobby[1] + ")":"Closed ") +
+ " | Lobby 3: " + (openLobbies[2]?"Open " + "(" + playersinlobby[2] + ")":"Closed" ));
+
+ } else if (j == (playerNames[1]+"_lobbylist")) { // if the input is lobbylist and sent by client2. To keep track of who wrote it, the client also sends their own name and an underscore here (see client code line 48)
+ Console.WriteLine(playerNames[1] + " Requested to see the lobby list");
+ writer.WriteLine("Lobby 1: " + (openLobbies[0]?"Open " + "(" + playersinlobby[0] + ")":"Closed ") +
+ " | Lobby 2: " + (openLobbies[1]?"Open " + "(" + playersinlobby[1] + ")":"Closed ") +
+ " | Lobby 3: " + (openLobbies[2]?"Open " + "(" + playersinlobby[2] + ")":"Closed" ));
+
+ } else if (j == (playerNames[2]+"_lobbylist")) { // if the input is lobbylist and sent by client3. To keep track of who wrote it, the client also sends their own name and an underscore here (see client code line 48)
+ Console.WriteLine(playerNames[2] + " Requested to see the lobby list");
+ writer.WriteLine("Lobby 1: " + (openLobbies[0]?"Open " + "(" + playersinlobby[0] + ")":"Closed ") +
+ " | Lobby 2: " + (openLobbies[1]?"Open " + "(" + playersinlobby[1] + ")":"Closed ") +
+ " | Lobby 3: " + (openLobbies[2]?"Open " + "(" + playersinlobby[2] + ")":"Closed" ));
+
+ } else if (j == (playerNames[0]+"_Open 1") || j == (playerNames[0]+"_open 1")) { // if the input is open 1 or Open 1 and sent by client2. To keep track of who wrote it, the client also sends their own name and an underscore here (see client code line 48)
+ if (!openLobbies[0]) {
+ openLobbies[0] = true;
+ writer.WriteLine("Opened lobby 1");
+ Console.WriteLine(playerNames[0] + " Opened lobby 1");
+ } else {
+ writer.WriteLine("Tried to open lobby 1 but it was already open.");
+ Console.WriteLine(playerNames[0] + " Tried to open lobby 1 but it was already open");
+ }
+ } else if (j == (playerNames[1]+"_Open 1") || j == (playerNames[1]+"_open 1")) {// if the input is open 1 or Open 1 and sent by client2. To keep track of who wrote it, the client also sends their own name and an underscore here (see client code line 48)
+ if (!openLobbies[0]) {
+ openLobbies[0] = true;
+ writer.WriteLine("Opened lobby 1");
+ Console.WriteLine(playerNames[1] + " Opened lobby 1");
+ } else {
+ writer.WriteLine("Tried to open lobby 1 but it was already open.");
+ Console.WriteLine(playerNames[1] + " Tried to open lobby 1 but it was already open");
+ }
+ } else if (j == (playerNames[2]+"_Open 1") || j == (playerNames[2]+"_open 1")) { // if the input is open 1 or Open 1 and sent by client2. To keep track of who wrote it, the client also sends their own name and an underscore here (see client code line 48)
+ if (!openLobbies[0]) {
+ openLobbies[0] = true;
+ writer.WriteLine("Opened lobby 1");
+ Console.WriteLine(playerNames[2] + " Opened lobby 1");
+ } else {
+ writer.WriteLine("Tried to open lobby 1 but it was already open.");
+ Console.WriteLine(playerNames[2] + " Tried to open lobby 1 but it was already open");
+ }
+ } else if (j == (playerNames[0]+"_Open 2") || j == (playerNames[0]+"_open 2")) { //all of the else if statements work this same way. see line 106 comment for explanation
+ if (!openLobbies[1]) {
+ openLobbies[1] = true;
+ writer.WriteLine("Opened lobby 2");
+ Console.WriteLine(playerNames[0] + " Opened lobby 2");
+ } else {
+ writer.WriteLine("Tried to open lobby 2 but it was already open.");
+ Console.WriteLine(playerNames[0] + " Tried to open lobby 2 but it was already open");
+ }
+ } else if (j == (playerNames[1]+"_Open 2") || j == (playerNames[1]+"_open 2")) { //all of the else if statements work this same way. see line 106 comment for explanation
+ if (!openLobbies[1]) {
+ openLobbies[1] = true;
+ writer.WriteLine("Opened lobby 2");
+ Console.WriteLine(playerNames[1] + " Opened lobby 2");
+ } else {
+ writer.WriteLine("Tried to open lobby 2 but it was already open.");
+ Console.WriteLine(playerNames[1] + " Tried to open lobby 2 but it was already open");
+ }
+ } else if (j == (playerNames[2]+"_Open 2") || j == (playerNames[2]+"_open 2")) { //all of the else if statements work this same way. see line 106 comment for explanation
+ if (!openLobbies[1]) {
+ openLobbies[1] = true;
+ writer.WriteLine("Opened lobby 2");
+ Console.WriteLine(playerNames[2] + " Opened lobby 2");
+ } else {
+ writer.WriteLine("Tried to open lobby 2 but it was already open.");
+ Console.WriteLine(playerNames[2] + " Tried to open lobby 2 but it was already open");
+ }
+ } else if (j == (playerNames[0]+"_Open 3") || j == (playerNames[0]+"_open 3")) { //all of the else if statements work this same way. see line 106 comment for explanation
+ if (!openLobbies[2]) {
+ openLobbies[2] = true;
+ writer.WriteLine("Opened lobby 3");
+ Console.WriteLine(playerNames[0] + " Opened lobby 3");
+ } else {
+ writer.WriteLine("Tried to open lobby 3 but it was already open.");
+ Console.WriteLine(playerNames[0] + " Tried to open lobby 3 but it was already open");
+ }
+ } else if (j == (playerNames[1]+"_Open 3") || j == (playerNames[1]+"_open 3")) { //all of the else if statements work this same way. see line 106 comment for explanation
+ if (!openLobbies[2]) {
+ openLobbies[2] = true;
+ writer.WriteLine("Opened lobby 3");
+ Console.WriteLine(playerNames[1] + " Opened lobby 3");
+ } else {
+ writer.WriteLine("Tried to open lobby 3 but it was already open.");
+ Console.WriteLine(playerNames[1] + " Tried to open lobby 3 but it was already open");
+ }
+ } else if (j == (playerNames[2]+"_Open 3") || j == (playerNames[2]+"_open 3")) { //all of the else if statements work this same way. see line 106 comment for explanation
+ if (!openLobbies[2]) {
+ openLobbies[2] = true;
+ writer.WriteLine("Opened lobby 3");
+ Console.WriteLine(playerNames[2] + " Opened lobby 3");
+ } else {
+ writer.WriteLine("Tried to open lobby 3 but it was already open.");
+ Console.WriteLine(playerNames[2] + " Tried to open lobby 3 but it was already open");
+ }
+ } else if (j == (playerNames[0]+"_Close 1") || j == (playerNames[0]+"_close 1")) { //all of the else if statements work this same way. see line 106 comment for explanation
+ if (openLobbies[0]) {
+ openLobbies[0] = false;
+ playersinlobby[0] = 0;
+ writer.WriteLine("Closed lobby 1");
+ Console.WriteLine(playerNames[0] + " Closed lobby 1");
+ } else {
+ writer.WriteLine("Tried to close lobby 1 but it was already closed.");
+ Console.WriteLine(playerNames[0] + " Tried to close lobby 1 but it was already closed");
+ }
+ } else if (j == (playerNames[1]+"_Close 1") || j == (playerNames[1]+"_close 1")) { //all of the else if statements work this same way. see line 106 comment for explanation
+ if (openLobbies[0]) {
+ openLobbies[0] = false;
+ playersinlobby[0] = 0;
+ writer.WriteLine("Closed lobby 1");
+ Console.WriteLine(playerNames[1] + " Closed lobby 1");
+ } else {
+ writer.WriteLine("Tried to close lobby 1 but it was already closed.");
+ Console.WriteLine(playerNames[1] + " Tried to close lobby 1 but it was already closed");
+ }
+ } else if (j == (playerNames[2]+"_Close 1") || j == (playerNames[2]+"_close 1")) { //all of the else if statements work this same way. see line 106 comment for explanation
+ if (openLobbies[0]) {
+ openLobbies[0] = false;
+ playersinlobby[0] = 0;
+ writer.WriteLine("Closed lobby 1");
+ Console.WriteLine(playerNames[2] + " Closed lobby 1");
+ } else {
+ writer.WriteLine("Tried to close lobby 1 but it was already closed.");
+ Console.WriteLine(playerNames[2] + " Tried to close lobby 1 but it was already closed");
+ }
+ } else if (j == (playerNames[0]+"_Close 2") || j == (playerNames[0]+"_close 2")) { //all of the else if statements work this same way. see line 106 comment for explanation
+ if (openLobbies[1]) {
+ openLobbies[1] = false;
+ playersinlobby[1] = 0;
+ writer.WriteLine("Closed lobby 2");
+ Console.WriteLine(playerNames[0] + " Closed lobby 2");
+ } else {
+ writer.WriteLine("Tried to close lobby 2 but it was already closed.");
+ Console.WriteLine(playerNames[0] + " Tried to close lobby 2 but it was already closed");
+ }
+ } else if (j == (playerNames[1]+"_Close 2") || j == (playerNames[1]+"_close 2")) { //all of the else if statements work this same way. see line 106 comment for explanation
+ if (openLobbies[1]) {
+ openLobbies[1] = false;
+ writer.WriteLine("Closed lobby 2");
+ playersinlobby[1] = 0;
+ Console.WriteLine(playerNames[1] + " Closed lobby 2");
+ } else {
+ writer.WriteLine("Tried to close lobby 2 but it was already closed.");
+ Console.WriteLine(playerNames[1] + " Tried to close lobby 2 but it was already closed");
+ }
+ } else if (j == (playerNames[2]+"_Close 2") || j == (playerNames[2]+"_close 2")) { //all of the else if statements work this same way. see line 106 comment for explanation
+ if (openLobbies[1]) {
+ openLobbies[1] = false;
+ writer.WriteLine("Closed lobby 2");
+ playersinlobby[1] = 0;
+ Console.WriteLine(playerNames[2] + " Closed lobby 2");
+ } else {
+ writer.WriteLine("Tried to close lobby 2 but it was already closed.");
+ Console.WriteLine(playerNames[2] + " Tried to close lobby 2 but it was already closed");
+ }
+ } else if (j == (playerNames[0]+"_Close 3") || j == (playerNames[0]+"_close 3")) { //this statement lets players close lobby 3. all of the else if statements work this same way. see line 106 comment for explanation.
+ if (openLobbies[2]) {
+ openLobbies[2] = false;
+ playersinlobby[2] = 0;
+ writer.WriteLine("Closed lobby 3");
+ Console.WriteLine(playerNames[0] + " Closed lobby 3");
+ } else {
+ writer.WriteLine("Tried to close lobby 3 but it was already closed.");
+ Console.WriteLine(playerNames[0] + " Tried to close lobby 3 but it was already closed");
+ }
+ } else if (j == (playerNames[1]+"_Close 3") || j == (playerNames[1]+"_close 3")) { //this statement lets players close lobby 3. all of the else if statements work this same way. see line 106 comment for explanation.
+ if (openLobbies[2]) {
+ openLobbies[2] = false;
+ playersinlobby[2] = 0;
+ writer.WriteLine("Closed lobby 3");
+ Console.WriteLine(playerNames[1] + " Closed lobby 3");
+ } else {
+ writer.WriteLine("Tried to close lobby 3 but it was already closed.");
+ Console.WriteLine(playerNames[1] + " Tried to close lobby 3 but it was already closed");
+ }
+ } else if (j == (playerNames[2]+"_Close 3") || j == (playerNames[2]+"_close 3")) { //this statement lets players close lobby 3. all of the else if statements work this same way. see line 106 comment for explanation.
+ if (openLobbies[2]) {
+ openLobbies[2] = false;
+ playersinlobby[2] = 0;
+ writer.WriteLine("Closed lobby 3");
+ Console.WriteLine(playerNames[2] + " Closed lobby 3");
+ } else {
+ writer.WriteLine("Tried to close lobby 3 but it was already closed.");
+ Console.WriteLine(playerNames[2] + " Tried to close lobby 3 but it was already closed");
+ }
+
+ } else if (j == (playerNames[0]+"_join 1") || j == (playerNames[0]+"_Join 1")) { //all of the else if statements work this same way. see line 106 comment for explanation
+ if (openLobbies[0] && !playerinlobby[0]) {
+ playersinlobby[0]++;
+ playerinlobby[0] = true;
+ tempLobby[0] = 1;
+ writer.WriteLine("Joined lobby 1 (" + playersinlobby[0] + ")");
+ Console.WriteLine(playerNames[0] + " Joined lobby 1 (" + playersinlobby[0] + ")");
+ } else {
+ writer.WriteLine("Sorry! Lobby 1 is currently closed or you are already in a lobby.");
+ Console.WriteLine(playerNames[0] + " Tried to join lobby 1 but it was closed or he is already in a lobby.");
+ }
+ } else if (j == (playerNames[1]+"_join 1") || j == (playerNames[1]+"_Join 1")) { //all of the else if statements work this same way. see line 106 comment for explanation
+ if (openLobbies[0] && !playerinlobby[1]) {
+ playersinlobby[0]++;
+ playerinlobby[1] = true;
+ tempLobby[1] = 1;
+ writer.WriteLine("Joined lobby 1 (" + playersinlobby[0] + ")");
+ Console.WriteLine(playerNames[1] + " Joined lobby 1 (" + playersinlobby[0] + ")");
+ } else {
+ writer.WriteLine("Sorry! Lobby 1 is currently closed or you are already in a lobby.");
+ Console.WriteLine(playerNames[1] + " Tried to join lobby 1 but it was closed or he is already in a lobby.");
+ }
+ } else if (j == (playerNames[2]+"_join 1") || j == (playerNames[2]+"_Join 1")) { //all of the else if statements work this same way. see line 106 comment for explanation
+ if (openLobbies[0] && !playerinlobby[2]) {
+ playersinlobby[0]++;
+ playerinlobby[2] = true;
+ tempLobby[2] = 1;
+ writer.WriteLine("Joined lobby 1 (" + playersinlobby[0] + ")");
+ Console.WriteLine(playerNames[0] + " Joined lobby 1 (" + playersinlobby[0] + ")");
+ } else {
+ writer.WriteLine("Sorry! Lobby 1 is currently closed or you are already in a lobby.");
+ Console.WriteLine(playerNames[0] + " Tried to join lobby 1 but it was closed or he is already in a lobby.");
+ }
+ } else if (j == (playerNames[0]+"_join 2") || j == (playerNames[0]+"_Join 2")) { //all of the else if statements work this same way. see line 106 comment for explanation
+ if (openLobbies[1] && !playerinlobby[0]) {
+ playersinlobby[1]++;
+ playerinlobby[0] = true;
+ tempLobby[0] = 2;
+ writer.WriteLine("Joined lobby 2 (" + playersinlobby[1] + ")");
+ Console.WriteLine(playerNames[0] + " Joined lobby 2 (" + playersinlobby[1] + ")");
+ } else {
+ writer.WriteLine("Sorry! Lobby 2 is currently closed or you are already in a lobby.");
+ Console.WriteLine(playerNames[0] + " Tried to join lobby 2 but it was closed or he is already in a lobby.");
+ }
+ } else if (j == (playerNames[1]+"_join 2") || j == (playerNames[1]+"_Join 2")) { //all of the else if statements work this same way. see line 106 comment for explanation
+ if (openLobbies[1] && !playerinlobby[1]) {
+ playersinlobby[1]++;
+ playerinlobby[1] = true;
+ tempLobby[1] = 2;
+ writer.WriteLine("Joined lobby 2 (" + playersinlobby[1] + ")");
+ Console.WriteLine(playerNames[1] + " Joined lobby 2 (" + playersinlobby[1] + ")");
+ } else {
+ writer.WriteLine("Sorry! Lobby 2 is currently closed or you are already in a lobby.");
+ Console.WriteLine(playerNames[1] + " Tried to join lobby 2 but it was closed or he is already in a lobby.");
+ }
+ } else if (j == (playerNames[2]+"_join 2") || j == (playerNames[2]+"_Join 2")) { //all of the else if statements work this same way. see line 106 comment for explanation
+ if (openLobbies[1] && !playerinlobby[2]) {
+ playersinlobby[1]++;
+ playerinlobby[2] = true;
+ tempLobby[2] = 2;
+ writer.WriteLine("Joined lobby 2 (" + playersinlobby[1] + ")");
+ Console.WriteLine(playerNames[0] + " Joined lobby 2 (" + playersinlobby[1] + ")");
+ } else {
+ writer.WriteLine("Sorry! Lobby 2 is currently closed or you are already in a lobby.");
+ Console.WriteLine(playerNames[0] + " Tried to join lobby 2 but it was closed or he is already in a lobby.");
+ }
+ } else if (j == (playerNames[0]+"_join 3") || j == (playerNames[0]+"_Join 3")) { //this statement lets players join lobby 3. all of the else if statements work this same way. see line 106 comment for explanation.
+ if (openLobbies[2] && !playerinlobby[0]) {
+ playersinlobby[2]++;
+ playerinlobby[0] = true;
+ tempLobby[0] = 3;
+ writer.WriteLine("Joined lobby 3 (" + playersinlobby[2] + ")");
+ Console.WriteLine(playerNames[0] + " Joined lobby 3 (" + playersinlobby[2] + ")");
+ } else {
+ writer.WriteLine("Sorry! Lobby 3 is currently closed or you are already in a lobby.");
+ Console.WriteLine(playerNames[0] + " Tried to join lobby 3 but it was closed or he is already in a lobby.");
+ }
+ } else if (j == (playerNames[1]+"_join 3") || j == (playerNames[1]+"_Join 3")) { //this statement lets players join lobby 3. all of the else if statements work this same way. see line 106 comment for explanation.
+ if (openLobbies[2] && !playerinlobby[1]) {
+ playersinlobby[2]++;
+ playerinlobby[1] = true;
+ tempLobby[1] = 3;
+ writer.WriteLine("Joined lobby 3 (" + playersinlobby[2] + ")");
+ Console.WriteLine(playerNames[1] + " Joined lobby 3 (" + playersinlobby[2] + ")");
+ } else {
+ writer.WriteLine("Sorry! Lobby 3 is currently closed or you are already in a lobby.");
+ Console.WriteLine(playerNames[1] + " Tried to join lobby 3 but it was closed or he is already in a lobby.");
+ }
+ } else if (j == (playerNames[2]+"_join 3") || j == (playerNames[2]+"_Join 3")) { //this statement lets players join lobby 3. all of the else if statements work this same way. see line 106 comment for explanation.
+ if (openLobbies[2] && !playerinlobby[2]) {
+ playersinlobby[2]++;
+ playerinlobby[2] = true;
+ tempLobby[2] = 3;
+ writer.WriteLine("Joined lobby 3 (" + playersinlobby[2] + ")");
+ Console.WriteLine(playerNames[0] + " Joined lobby 3 (" + playersinlobby[2] + ")");
+ } else {
+ writer.WriteLine("Sorry! Lobby 3 is currently closed or you are already in a lobby.");
+ Console.WriteLine(playerNames[0] + " Tried to join lobby 3 but it was closed or he is already in a lobby.");
+ }
+ } else if (j == (playerNames[0]+"_leave")) { //this statement lets players leave the lobby they are currently in. all of the else if statements work this same way. see line 106 comment for explanation.
+ if (playerinlobby[0]) {
+ writer.WriteLine("Left lobby");
+ if (tempLobby[0] == 1) {
+ playersinlobby[0]--;
+ playerinlobby[0] = false;
+ }
+ if (tempLobby[0] == 2) {
+ playersinlobby[1]--;
+ playerinlobby[0] = false;
+ }
+ if (tempLobby[0] == 3) {
+ playersinlobby[2]--;
+ playerinlobby[0] = false;
+ }
+ Console.WriteLine(playerNames[0] + " Left lobby " + tempLobby[0]);
+ } else {
+ writer.WriteLine("Sorry. You are not in a lobby, so you can't leave it.");
+ Console.WriteLine(playerNames[0] + " Tried to leave lobby but was not in a lobby.");
+ }
+ } else if (j == (playerNames[1]+"_leave")) {
+ if (playerinlobby[1]) {
+ writer.WriteLine("Left lobby");
+ if (tempLobby[1] == 1) {
+ playersinlobby[0]--;
+ playerinlobby[1] = false;
+ }
+ if (tempLobby[1] == 2) {
+ playersinlobby[1]--;
+ playerinlobby[1] = false;
+ }
+ if (tempLobby[1] == 3) {
+ playersinlobby[2]--;
+ playerinlobby[1] = false;
+ }
+ Console.WriteLine(playerNames[1] + " Left lobby " + tempLobby[1]);
+ } else {
+ writer.WriteLine("Sorry. You are not in a lobby, so you can't leave it.");
+ Console.WriteLine(playerNames[1] + " Tried to leave lobby but was not in a lobby.");
+ }
+ } else if (j == (playerNames[2]+"_leave")) {
+ if (playerinlobby[2]) {
+ writer.WriteLine("Left lobby");
+ if (tempLobby[2] == 1) {
+ playersinlobby[0]--;
+ playerinlobby[2] = false;
+ }
+ if (tempLobby[2] == 2) {
+ playersinlobby[1]--;
+ playerinlobby[2] = false;
+ }
+ if (tempLobby[2] == 3) {
+ playersinlobby[2]--;
+ playerinlobby[2] = false;
+ }
+ Console.WriteLine(playerNames[2] + " Left lobby " + tempLobby[2]);
+ } else {
+ writer.WriteLine("Sorry. You are not in a lobby, so you can't leave it.");
+ Console.WriteLine(playerNames[2] + " Tried to leave lobby but was not in a lobby.");
+ }
+
+ } else if (s[s.Length-1] == '_' && s[s.Length-2] == '9' && s[s.Length-3] == 'x' && s[s.Length-4] == 'o' && s[s.Length-5] == 'x') { //checks if the last entries of the string received from client has xox9_. if it does the server starts the game
+ //Console.WriteLine("Received this input: " + s);
+ //Console.WriteLine("game");
+
+ Random rnd = new Random(); // "rnd" Random Object Created To Generate A Random Rolled Dice Number For Each Player
+
+ if (!foundRandom) { // If A Random Number Hasn't Been Found, Create One?
+ x = rnd.Next(1,100);
+ y = rnd.Next(1,100);
+ z = rnd.Next(1,100);
+ while (x == z && x == y && y == z) { // If All Players Have The Same Number, Generate A New For Each Player
+ x = rnd.Next(1,100);
+ y = rnd.Next(1,100);
+ z = rnd.Next(1,100);
+ }
+ foundRandom = true; // Set The Boolean To True After A Number Has Been Generated For Each Player
+ }
+
+ // If Statements Used To Write The Winner In The Output
+ if (x > y && x > z) {
+ writer.WriteLine(" Highest number wins! " + playerNames[0] + " rolled " + x + ". " + playerNames[1] + " rolled " + y + ". " + playerNames[2] + " rolled " + z + ". " + playerNames[0] + " Wins!! GAME OVER! RESTART SERVER AND CLIENTS TO PLAY AGAIN");
+ }
+ else if (x > y && x > z) {
+ writer.WriteLine(" Highest number wins! " + playerNames[0] + " rolled " + x + ". " + playerNames[1] + " rolled " + y + ". " + playerNames[2] + " rolled " + z + ". " + playerNames[0] + " Wins!! GAME OVER! RESTART SERVER AND CLIENTS TO PLAY AGAIN");
+ }
+ else if (x > y && x > z) {
+ writer.WriteLine(" Highest number wins! " + playerNames[0] + " rolled " + x + ". " + playerNames[1] + " rolled " + y + ". " + playerNames[2] + " rolled " + z + ". " + playerNames[0] + " Wins!! GAME OVER! RESTART SERVER AND CLIENTS TO PLAY AGAIN");
+ }
+ } else {
+ writer.WriteLine(""); // Update Players
+ }
+ }
+ // Displays How Many Players That Are Currently In The Lobby - Updates Everytime A New Player Joins
+
+ if (playersinlobby[0] == 3) {
+ //Console.WriteLine("3 Players connected to lobby 1! Ready to start game!");
+ writer.Write("3 Players connected to lobby 1! Ready to start game!");
+ }
+
+ if (playersinlobby[1] == 3) {
+ //Console.WriteLine("3 Players connected to lobby 2! Ready to start game!");
+ writer.Write("3 Players connected to lobby 2! Ready to start game!");
+ }
+
+ if (playersinlobby[2] == 3) {
+ //Console.WriteLine("3 Players connected to lobby 3! Ready to start game!");
+ writer.Write("3 Players connected to lobby 3! Ready to start game!");
+ }
+ writer.Flush(); // Flush The Writer
+ }
+ reader.Close(); // Called To Close Reader After 3 Players Have Joined
+ writer.Close(); // Called To Close Writer After 3 Players Have Joined
+ client.Close(); // The Client Closes Automatically After A Winner Has Been Found
+ Console.WriteLine("Closing client connection");
+ } catch (IOException) {
+ Console.WriteLine("There was a problem. Exiting"); // Write If A Problem/Exception Has Been Found
+ } finally { // Closes The Client After An Exception Is Caught
+ if (client != null) {
+ client.Close();
+ }
+ }
+ }
+
+ public static void Main() {
+
+ // Object Is Created From The Class TcpListener To Try And "Catch" A Client That Is Looking For The Server
+ TcpListener listener = null;
+ try {
+ // The Object Is Given An IPAdress: "127.0.0.1", And The Port: "10000"
+ listener = new TcpListener(IPAddress.Parse("127.0.0.1"), 10000);
+ listener.Start();
+ Console.WriteLine("MultiThreadedEchoServer started...");
+
+ // The Server Will Wait For Incoming Clients While Open
+ while (true) {
+ Console.WriteLine("Waiting for client...");
+ TcpClient client = listener.AcceptTcpClient();
+ Console.WriteLine("Accepted new client...");
+ Thread t = new Thread(ProcessClientRequests);
+ t.Start(client);
+ }
+ } catch (Exception e) {
+ Console.WriteLine(e);
+ } finally { // Called To Stop The Listener From Looking For Clients If An Exception Is Called
+ if (listener != null) {
+ listener.Stop();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/ClientServerMultithreading/ServerApplication/Properties/AssemblyInfo.cs b/ClientServerMultithreading/ServerApplication/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..f77f428c
--- /dev/null
+++ b/ClientServerMultithreading/ServerApplication/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("ServerApplication")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("ServerApplication")]
+[assembly: AssemblyCopyright("Copyright © 2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("775f7933-e0d9-4971-ad5d-4fee10fe2242")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/ClientServerMultithreading/ServerApplication/ServerApplication.csproj b/ClientServerMultithreading/ServerApplication/ServerApplication.csproj
new file mode 100644
index 00000000..ff66f67c
--- /dev/null
+++ b/ClientServerMultithreading/ServerApplication/ServerApplication.csproj
@@ -0,0 +1,63 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {775F7933-E0D9-4971-AD5D-4FEE10FE2242}
+ Exe
+ Properties
+ ServerApplication
+ ServerApplication
+ v4.5.2
+ 512
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\NetworkCommsDotNetComplete.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ClientServerMultithreading/ServerApplication/bin/Debug/NetworkCommsDotNetComplete.dll b/ClientServerMultithreading/ServerApplication/bin/Debug/NetworkCommsDotNetComplete.dll
new file mode 100644
index 00000000..06c269e3
Binary files /dev/null and b/ClientServerMultithreading/ServerApplication/bin/Debug/NetworkCommsDotNetComplete.dll differ
diff --git a/ClientServerMultithreading/ServerApplication/bin/Debug/ServerApplication.exe b/ClientServerMultithreading/ServerApplication/bin/Debug/ServerApplication.exe
new file mode 100644
index 00000000..f070c0c1
Binary files /dev/null and b/ClientServerMultithreading/ServerApplication/bin/Debug/ServerApplication.exe differ
diff --git a/ClientServerMultithreading/ServerApplication/bin/Debug/ServerApplication.exe.config b/ClientServerMultithreading/ServerApplication/bin/Debug/ServerApplication.exe.config
new file mode 100644
index 00000000..88fa4027
--- /dev/null
+++ b/ClientServerMultithreading/ServerApplication/bin/Debug/ServerApplication.exe.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ClientServerMultithreading/ServerApplication/bin/Debug/ServerApplication.pdb b/ClientServerMultithreading/ServerApplication/bin/Debug/ServerApplication.pdb
new file mode 100644
index 00000000..717bb562
Binary files /dev/null and b/ClientServerMultithreading/ServerApplication/bin/Debug/ServerApplication.pdb differ
diff --git a/ClientServerMultithreading/ServerApplication/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ClientServerMultithreading/ServerApplication/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
new file mode 100644
index 00000000..697d54aa
Binary files /dev/null and b/ClientServerMultithreading/ServerApplication/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/ClientServerMultithreading/ServerApplication/obj/Debug/ServerApplication.csproj.CopyComplete b/ClientServerMultithreading/ServerApplication/obj/Debug/ServerApplication.csproj.CopyComplete
new file mode 100644
index 00000000..e69de29b
diff --git a/ClientServerMultithreading/ServerApplication/obj/Debug/ServerApplication.csproj.CoreCompileInputs.cache b/ClientServerMultithreading/ServerApplication/obj/Debug/ServerApplication.csproj.CoreCompileInputs.cache
new file mode 100644
index 00000000..2ecf6c3b
--- /dev/null
+++ b/ClientServerMultithreading/ServerApplication/obj/Debug/ServerApplication.csproj.CoreCompileInputs.cache
@@ -0,0 +1 @@
+302d5aeaa93017e63124a31b5bed839eb7659763
diff --git a/ClientServerMultithreading/ServerApplication/obj/Debug/ServerApplication.csproj.FileListAbsolute.txt b/ClientServerMultithreading/ServerApplication/obj/Debug/ServerApplication.csproj.FileListAbsolute.txt
new file mode 100644
index 00000000..5532f725
--- /dev/null
+++ b/ClientServerMultithreading/ServerApplication/obj/Debug/ServerApplication.csproj.FileListAbsolute.txt
@@ -0,0 +1,35 @@
+c:\users\alexa\documents\visual studio 2015\Projects\ClientServerApplication\ServerApplication\obj\Debug\ServerApplication.csprojResolveAssemblyReference.cache
+c:\users\alexa\documents\visual studio 2015\Projects\ClientServerApplication\ServerApplication\bin\Debug\ServerApplication.exe.config
+c:\users\alexa\documents\visual studio 2015\Projects\ClientServerApplication\ServerApplication\bin\Debug\ServerApplication.exe
+c:\users\alexa\documents\visual studio 2015\Projects\ClientServerApplication\ServerApplication\bin\Debug\ServerApplication.pdb
+c:\users\alexa\documents\visual studio 2015\Projects\ClientServerApplication\ServerApplication\bin\Debug\NetworkCommsDotNetComplete.dll
+c:\users\alexa\documents\visual studio 2015\Projects\ClientServerApplication\ServerApplication\obj\Debug\ServerApplication.exe
+c:\users\alexa\documents\visual studio 2015\Projects\ClientServerApplication\ServerApplication\obj\Debug\ServerApplication.pdb
+C:\Users\alexa\Documents\visual studio 2015\Projects\ClientServerMultithreading\ServerApplication\bin\Debug\ServerApplication.exe.config
+C:\Users\alexa\Documents\visual studio 2015\Projects\ClientServerMultithreading\ServerApplication\bin\Debug\ServerApplication.exe
+C:\Users\alexa\Documents\visual studio 2015\Projects\ClientServerMultithreading\ServerApplication\bin\Debug\ServerApplication.pdb
+C:\Users\alexa\Documents\visual studio 2015\Projects\ClientServerMultithreading\ServerApplication\bin\Debug\NetworkCommsDotNetComplete.dll
+C:\Users\alexa\Documents\visual studio 2015\Projects\ClientServerMultithreading\ServerApplication\obj\Debug\ServerApplication.csprojResolveAssemblyReference.cache
+C:\Users\alexa\Documents\visual studio 2015\Projects\ClientServerMultithreading\ServerApplication\obj\Debug\ServerApplication.exe
+C:\Users\alexa\Documents\visual studio 2015\Projects\ClientServerMultithreading\ServerApplication\obj\Debug\ServerApplication.pdb
+C:\Github\pcss_group10\EXTRA\ClientServerMultithreading\ServerApplication\bin\Debug\ServerApplication.exe.config
+C:\Github\pcss_group10\EXTRA\ClientServerMultithreading\ServerApplication\bin\Debug\ServerApplication.exe
+C:\Github\pcss_group10\EXTRA\ClientServerMultithreading\ServerApplication\bin\Debug\ServerApplication.pdb
+C:\Github\pcss_group10\EXTRA\ClientServerMultithreading\ServerApplication\obj\Debug\ServerApplication.csprojResolveAssemblyReference.cache
+C:\Github\pcss_group10\EXTRA\ClientServerMultithreading\ServerApplication\obj\Debug\ServerApplication.csproj.CoreCompileInputs.cache
+C:\Github\pcss_group10\EXTRA\ClientServerMultithreading\ServerApplication\obj\Debug\ServerApplication.exe
+C:\Github\pcss_group10\EXTRA\ClientServerMultithreading\ServerApplication\obj\Debug\ServerApplication.pdb
+C:\Github\pcss_group10\ClientServerMultithreading\ServerApplication\bin\Debug\ServerApplication.exe.config
+C:\Github\pcss_group10\ClientServerMultithreading\ServerApplication\bin\Debug\ServerApplication.exe
+C:\Github\pcss_group10\ClientServerMultithreading\ServerApplication\bin\Debug\ServerApplication.pdb
+C:\Github\pcss_group10\ClientServerMultithreading\ServerApplication\obj\Debug\ServerApplication.csprojResolveAssemblyReference.cache
+C:\Github\pcss_group10\ClientServerMultithreading\ServerApplication\obj\Debug\ServerApplication.csproj.CoreCompileInputs.cache
+C:\Github\pcss_group10\ClientServerMultithreading\ServerApplication\obj\Debug\ServerApplication.exe
+C:\Github\pcss_group10\ClientServerMultithreading\ServerApplication\obj\Debug\ServerApplication.pdb
+C:\Users\gta4w\Documents\GitHub\pcss_group10\ClientServerMultithreading\ServerApplication\bin\Debug\ServerApplication.exe.config
+C:\Users\gta4w\Documents\GitHub\pcss_group10\ClientServerMultithreading\ServerApplication\bin\Debug\ServerApplication.exe
+C:\Users\gta4w\Documents\GitHub\pcss_group10\ClientServerMultithreading\ServerApplication\bin\Debug\ServerApplication.pdb
+C:\Users\gta4w\Documents\GitHub\pcss_group10\ClientServerMultithreading\ServerApplication\obj\Debug\ServerApplication.csprojResolveAssemblyReference.cache
+C:\Users\gta4w\Documents\GitHub\pcss_group10\ClientServerMultithreading\ServerApplication\obj\Debug\ServerApplication.csproj.CoreCompileInputs.cache
+C:\Users\gta4w\Documents\GitHub\pcss_group10\ClientServerMultithreading\ServerApplication\obj\Debug\ServerApplication.exe
+C:\Users\gta4w\Documents\GitHub\pcss_group10\ClientServerMultithreading\ServerApplication\obj\Debug\ServerApplication.pdb
diff --git a/ClientServerMultithreading/ServerApplication/obj/Debug/ServerApplication.csprojResolveAssemblyReference.cache b/ClientServerMultithreading/ServerApplication/obj/Debug/ServerApplication.csprojResolveAssemblyReference.cache
new file mode 100644
index 00000000..3c63fba9
Binary files /dev/null and b/ClientServerMultithreading/ServerApplication/obj/Debug/ServerApplication.csprojResolveAssemblyReference.cache differ
diff --git a/ClientServerMultithreading/ServerApplication/obj/Debug/ServerApplication.exe b/ClientServerMultithreading/ServerApplication/obj/Debug/ServerApplication.exe
new file mode 100644
index 00000000..f070c0c1
Binary files /dev/null and b/ClientServerMultithreading/ServerApplication/obj/Debug/ServerApplication.exe differ
diff --git a/ClientServerMultithreading/ServerApplication/obj/Debug/ServerApplication.pdb b/ClientServerMultithreading/ServerApplication/obj/Debug/ServerApplication.pdb
new file mode 100644
index 00000000..717bb562
Binary files /dev/null and b/ClientServerMultithreading/ServerApplication/obj/Debug/ServerApplication.pdb differ
diff --git a/ClientServerMultithreading/ServerApplication/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/ClientServerMultithreading/ServerApplication/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100644
index 00000000..e69de29b
diff --git a/ClientServerMultithreading/ServerApplication/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/ClientServerMultithreading/ServerApplication/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100644
index 00000000..e69de29b
diff --git a/ClientServerMultithreading/ServerApplication/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/ClientServerMultithreading/ServerApplication/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100644
index 00000000..e69de29b
diff --git a/HAND IN FOLDER/ClientApplication.exe b/HAND IN FOLDER/ClientApplication.exe
new file mode 100644
index 00000000..3b6d7e16
Binary files /dev/null and b/HAND IN FOLDER/ClientApplication.exe differ
diff --git a/HAND IN FOLDER/Mini-project requirements.txt b/HAND IN FOLDER/Mini-project requirements.txt
new file mode 100644
index 00000000..6e371a47
--- /dev/null
+++ b/HAND IN FOLDER/Mini-project requirements.txt
@@ -0,0 +1,35 @@
+Mini-project hand-in Assignment
+General
+
+In order to get access to the written exam, you need to develop a client-server software divided in groups of 6 people.
+
+Within each group, 3 people have to develop the client and the other 3 have to program the server.
+
+The project should be hosted on GitHub, you will need to create two repositories one for the server and one for the client, the name of each repository should be: whateveryouwant-server and whateveryouwant-client (I advice you to use lowercase).
+
+You will need to use GitHub as a platform for project documentation (wiki), project management (tickets) and source code versioning (git).
+
+For each group, two repositories should be created and this can be done by any member of the group. That member should afterwards invite the other members to contribute to the repository (click on Settings and then to Collaborators).
+
+The software can be written in any OOP language (e.g. Java, C++ or C#); however, in class and during the final examination, C++ is used as the teaching and examination language. You are strongly discouraged to develop your project in Unity because of technical limitations.
+
+Evaluation and final submission
+
+In order to be evaluated positively in the project you will have to contribute to its development by a share proportional to the number of people in the group (e.g. 33% for groups for 3 people). GitHub keeps track of each user's activity, so remember to work from your own computer.
+
+At the time of the submission the project's page on github should contain all the necessary documentation of both the client and the server.
+
+The documentation should contain all information necessary for another developer to extend the projects (e.g. UML class and sequence diagrams) and the instructions to download and run the game. The definition of the communication protocol between the server and the client should also be included.
+
+Furthermore, the GitHub ticketing systems should be used to create a plan of the development and the tickets should be distributed evenly between the group members.
+
+For the final submission, you will need to create a release of your projects and each member of the group should submit a link to both the client and server repositories.
+
+Project characteristics
+
+On-line multiplayer board game or another client-server application
+Has a lobby where games can be organised (eg. created, closed, joined and started)
+Client-server architecture that supports at least 3 clients
+Before you get to the networking bit of the program, it would be a good idea to start developing the client.
+
+Deadline: 06 November 2017, 23:55
\ No newline at end of file
diff --git a/HAND IN FOLDER/PCSS Documentation.pdf b/HAND IN FOLDER/PCSS Documentation.pdf
new file mode 100644
index 00000000..b5791859
Binary files /dev/null and b/HAND IN FOLDER/PCSS Documentation.pdf differ
diff --git a/HAND IN FOLDER/Readme (HOW TO USE SOLUTION).txt b/HAND IN FOLDER/Readme (HOW TO USE SOLUTION).txt
new file mode 100644
index 00000000..53a98d41
--- /dev/null
+++ b/HAND IN FOLDER/Readme (HOW TO USE SOLUTION).txt
@@ -0,0 +1,4 @@
+How to use solution
+Step 1. Open server
+Step 2. Open 3 clients
+Step 3. Follow on screen instructions. Start by choosing a name. All of them are “admins” and they can all open or close the 3 lobbies. Type lobbylist to see which lobbies are open, and if any are open you can see how many players are in them. When 3 people join a lobby, the game starts.
diff --git a/HAND IN FOLDER/ServerApplication.exe b/HAND IN FOLDER/ServerApplication.exe
new file mode 100644
index 00000000..f070c0c1
Binary files /dev/null and b/HAND IN FOLDER/ServerApplication.exe differ
diff --git a/README.md b/README.md
index 5a3ddf38..317dc178 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,17 @@
-# pcss
\ No newline at end of file
+# pcss_group10
+
+Group Members:
+Josef Adil Jensen
+Alexander Christian Larsen
+Mathias Emil Kjeldsen
+Bjørn Aagaard Skalkam
+Jens Hornshøj-Møller
+Simon Ravn
+
+Student emails:
+josjen16@student.aau.dk
+acla16@student.aau.dk
+mekj16@student.aau.dk
+bskalk16@student.aau.dk
+jhorns16@student.aau.dk
+srav16@student.aau.dk