restructuring to allow for networking
This commit is contained in:
26
Makefile
26
Makefile
@ -1,15 +1,29 @@
|
|||||||
.PHONY: main clean
|
.PHONY: main clean run
|
||||||
|
|
||||||
|
CC:=mcs
|
||||||
SRCD:=src/
|
SRCD:=src/
|
||||||
SRC:=Program.cs Figura.cs Asztal.cs enum.cs
|
SRC:=Figura.cs Asztal.cs PlaccInfo.cs enum.cs
|
||||||
SRC:=$(addprefix ${SRCD},${SRC})
|
SRC:=$(addprefix ${SRCD},${SRC})
|
||||||
OUTPUT:=chess.mono
|
COMP:=${CC} ${SRC}
|
||||||
|
OUTPUT:=chess.exe Chess_server.exe Chess_client.exe
|
||||||
|
|
||||||
main:
|
main: server client singleplayer
|
||||||
mcs ${SRC} -o ${OUTPUT}
|
@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:
|
run:
|
||||||
mono ${OUTPUT}
|
mono $(word 2,3,${OUTPUT})
|
||||||
|
|
||||||
|
run_single:
|
||||||
|
mono $(word 1,${OUTPUT})
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm ${OUTPUT}
|
rm ${OUTPUT}
|
||||||
|
20
src/Client.cs
Normal file
20
src/Client.cs
Normal 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
|
@ -1,24 +1,5 @@
|
|||||||
using System;
|
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 class HelyInfo{
|
||||||
public uint x;
|
public uint x;
|
||||||
public uint y;
|
public uint y;
|
15
src/Server.cs
Normal file
15
src/Server.cs
Normal 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
19
src/SinglePlayer.cs
Normal 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
|
Reference in New Issue
Block a user