-
Notifications
You must be signed in to change notification settings - Fork 0
/
Connect3_Game.src
73 lines (52 loc) · 1.27 KB
/
Connect3_Game.src
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
&ACCESS RVP
&REL 4
&PARAM DISKPATH = KRC:\R1\Program
DEF Connect3_Game ( )
;######### START USER DEFINED
;Structures
;Variables
DECL INT GAME_MODE, GRAVITY
DECL INT whoPlays, whoWon
;######### END USER DEFINED
;FOLD INI;%{PE}
;FOLD BASISTECH INI
GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0 )
;ENDFOLD (BASISTECH INI)
;FOLD USER INI
;Make your modifications here
;ENDFOLD (USER INI)
;ENDFOLD (INI)
;FOLD PTP HOME Vel= 100 % DEFAULT;%{PE}%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:100, 7:DEFAULT
$BWDSTART = FALSE
PDAT_ACT=PDEFAULT
FDAT_ACT=FHOME
BAS (#PTP_PARAMS,100 )
$H_POS=XHOME
PTP XHOME
;ENDFOLD
;###### START GAME CODE
;-> Auswahl Gamemode und Gravity Modus
GAME_MODE = C3_IO(1)
GRAVITY = C3_IO(2)
;-> Schere, Stein, Papier wer beginnt
whoPlays = C3_IO(3)
SWITCH GAME_MODE
case 1
C3_GHvH(GRAVITY, whoPlays)
case 2
whoWon = C3_HvR()
case 3
whoWon = C3_RvR()
ENDSWITCH
; AUSGABE "PLAYER %d WON !! "
;FOLD PTP HOME Vel= 100 % DEFAULT;%{PE}%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:100, 7:DEFAULT
$BWDSTART = FALSE
PDAT_ACT=PDEFAULT
FDAT_ACT=FHOME
BAS (#PTP_PARAMS,100 )
$H_POS=XHOME
PTP XHOME
;ENDFOLD
END