restructuring to allow for networking

This commit is contained in:
anon 2022-11-22 03:38:47 +01:00
parent 9ca7955326
commit 1a990ddefc
5 changed files with 74 additions and 25 deletions

View File

@ -1,15 +1,29 @@
.PHONY: main clean
.PHONY: main clean run
CC:=mcs
SRCD:=src/
SRC:=Program.cs Figura.cs Asztal.cs enum.cs
SRC:=Figura.cs Asztal.cs PlaccInfo.cs enum.cs
SRC:=$(addprefix ${SRCD},${SRC})
OUTPUT:=chess.mono
COMP:=${CC} ${SRC}
OUTPUT:=chess.exe Chess_server.exe Chess_client.exe
main:
mcs ${SRC} -o ${OUTPUT}
main: server client singleplayer
@echo done
server:
${COMP} ${SRCD}/Server.cs -out:$(word 2,${OUTPUT})
client:
${COMP} ${SRCD}/Client.cs -out:$(word 3,${OUTPUT})
singleplayer:
${COMP} ${SRCD}/SinglePlayer.cs -out:$(word 1,${OUTPUT})
run:
mono ${OUTPUT}
mono $(word 2,3,${OUTPUT})
run_single:
mono $(word 1,${OUTPUT})
clean:
rm ${OUTPUT}

20
src/Client.cs Normal file
View File

@ -0,0 +1,20 @@
using System;
#region progi
//###########################
// ¤¤¤ Execution Entry ¤¤¤
//###########################
class Program{
static Random r = new Random();
static void Main(string[] args){
Asztal tabla = new Asztal(Jatekmod.klasszikus);
while(true){
tabla.print();
tabla.mozgat();
}
}
}
#endregion

View File

@ -1,24 +1,5 @@
using System;
#region progi
//###########################
// ¤¤¤ Execution Entry ¤¤¤
//###########################
class Program{
static Random r = new Random();
static void Main(string[] args){
Asztal tabla = new Asztal(Jatekmod.klasszikus);
while(true){
tabla.print();
tabla.mozgat();
}
}
}
#endregion
public class HelyInfo{
public uint x;
public uint y;

15
src/Server.cs Normal file
View File

@ -0,0 +1,15 @@
using System;
class Program{
static Random r = new Random();
static void Main(string[] args){
Asztal tabla = new Asztal(Jatekmod.klasszikus);
while(true){
tabla.print();
tabla.mozgat();
}
}
}

19
src/SinglePlayer.cs Normal file
View File

@ -0,0 +1,19 @@
using System;
#region progi
//###########################
// ¤¤¤ Execution Entry ¤¤¤
//###########################
class Program{
static Random r = new Random();
static void Main(string[] args){
Asztal tabla = new Asztal(Jatekmod.klasszikus);
while(true){
tabla.print();
tabla.mozgat();
}
}
}
#endregion