-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.m
58 lines (40 loc) · 1.15 KB
/
main.m
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
close all;
clear all;
% Create instances of 'player'
player_0 = player;
player_1 = player;
player_2 = player;
% Create instances of 'pokerGameUI'
% TODO: UI background
player_0_UI = pokerGameUI;
player_0.currUI = player_0_UI;
player_0.currUI.currPlayer = player_0;
player_1_UI = pokerGameUI;
player_1.currUI = player_1_UI;
player_1.currUI.currPlayer = player_1;
player_2_UI = pokerGameUI;
player_2.currUI = player_2_UI;
player_2.currUI.currPlayer = player_2;
% player_0.currUI.currPlayer = player_0;
player_0.currUI.player_1 = player_1;
player_0.currUI.player_2 = player_2;
% player_1.currUI.currPlayer = player_1;
player_1.currUI.player_1 = player_0;
player_1.currUI.player_2 = player_2;
% player_2.currUI.currPlayer = player_2;
player_2.currUI.player_1 = player_0;
player_2.currUI.player_2 = player_1;
% Create the instance of pokerRule
rule = pokerRule;
% Create instance of 'gameEngine'
ge = gameEngine;
ge.bgm();
ge.player_0 = player_0;
ge.player_1 = player_1;
ge.player_2 = player_2;
ge.rule = rule;
rule.gameEngine = ge;
% set gameEngine to different UIs
player_0.currUI.gameEngine = ge;
player_1.currUI.gameEngine = ge;
player_2.currUI.gameEngine = ge;