restructuring to allow for networking
This commit is contained in:
parent
9ca7955326
commit
1a990ddefc
26
Makefile
26
Makefile
@ -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
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;
|
||||
|
||||
|
||||
#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
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
|
Loading…
x
Reference in New Issue
Block a user