-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.m
3299 lines (2805 loc) · 125 KB
/
app.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
classdef okienkowo < matlab.apps.AppBase
% Autor: Anton Yushkevich
% Gra Saper
% Zasady:
% Na planszy gry znajduje się pewna liczba bomb. Trzeba otworzyć
% wszystkie komórki gry oprócz tych, gdzie znajdują się bomby.
% Na każdej z otworzonych komórek jest napisana liczba bomb obok
% (w kwadracie 3x3 z centrum w tej komórce) jeśli ta liczba jest
% większa od zera. Komórki można oznaczać flagą (nie będą otworzone).
% W prawym górnym rogu jest liczba jeszcze nie zaznaczonych flagą
% bomb (postawienie flagi zminiejsza tą liczbę niezależnie od tego,
% czy ona była postawiona na komórkę z bombą czy nie). Liczba flag
% nie jest ograniczona. Opracowanie otwarzania komórki z bombą
% czy komórki bez bomby w okolice może zajmować pewien czas.
% Dla zmiany poziomu trudności trzeba wybrać odpowiedni i kliknąć
% przycisk restart.
% Gra się kończy po otworzeniu wszystkich komórek bez bomb lub
% po kliknięciu na komórkę z bombą.
% Properties that correspond to app components
properties (Access = public)
UIFigure matlab.ui.Figure
RestartButton matlab.ui.control.Button
ButtonGroup matlab.ui.container.ButtonGroup
CursorButton matlab.ui.control.RadioButton
FlagButton matlab.ui.control.RadioButton
FlagImage matlab.ui.control.Image
CursorImage matlab.ui.control.Image
LevelChoice matlab.ui.control.DropDown
MinesLeft1 matlab.ui.control.Image
MinesLeft2 matlab.ui.control.Image
Field matlab.ui.container.ButtonGroup
Cell_1_1 matlab.ui.control.Button
Cell_1_2 matlab.ui.control.Button
Cell_1_3 matlab.ui.control.Button
Cell_1_4 matlab.ui.control.Button
Cell_1_5 matlab.ui.control.Button
Cell_1_6 matlab.ui.control.Button
Cell_1_7 matlab.ui.control.Button
Cell_1_8 matlab.ui.control.Button
Cell_1_9 matlab.ui.control.Button
Cell_1_10 matlab.ui.control.Button
Cell_1_11 matlab.ui.control.Button
Cell_1_12 matlab.ui.control.Button
Cell_1_13 matlab.ui.control.Button
Cell_1_14 matlab.ui.control.Button
Cell_1_15 matlab.ui.control.Button
Cell_2_1 matlab.ui.control.Button
Cell_2_2 matlab.ui.control.Button
Cell_2_3 matlab.ui.control.Button
Cell_2_4 matlab.ui.control.Button
Cell_2_5 matlab.ui.control.Button
Cell_2_6 matlab.ui.control.Button
Cell_2_7 matlab.ui.control.Button
Cell_2_8 matlab.ui.control.Button
Cell_2_9 matlab.ui.control.Button
Cell_2_10 matlab.ui.control.Button
Cell_2_11 matlab.ui.control.Button
Cell_2_12 matlab.ui.control.Button
Cell_2_13 matlab.ui.control.Button
Cell_2_14 matlab.ui.control.Button
Cell_2_15 matlab.ui.control.Button
Cell_3_1 matlab.ui.control.Button
Cell_3_2 matlab.ui.control.Button
Cell_3_3 matlab.ui.control.Button
Cell_3_4 matlab.ui.control.Button
Cell_3_5 matlab.ui.control.Button
Cell_3_6 matlab.ui.control.Button
Cell_3_7 matlab.ui.control.Button
Cell_3_8 matlab.ui.control.Button
Cell_3_9 matlab.ui.control.Button
Cell_3_10 matlab.ui.control.Button
Cell_3_11 matlab.ui.control.Button
Cell_3_12 matlab.ui.control.Button
Cell_3_13 matlab.ui.control.Button
Cell_3_14 matlab.ui.control.Button
Cell_3_15 matlab.ui.control.Button
Cell_4_1 matlab.ui.control.Button
Cell_4_2 matlab.ui.control.Button
Cell_4_3 matlab.ui.control.Button
Cell_4_4 matlab.ui.control.Button
Cell_4_5 matlab.ui.control.Button
Cell_4_6 matlab.ui.control.Button
Cell_4_7 matlab.ui.control.Button
Cell_4_8 matlab.ui.control.Button
Cell_4_9 matlab.ui.control.Button
Cell_4_10 matlab.ui.control.Button
Cell_4_11 matlab.ui.control.Button
Cell_4_12 matlab.ui.control.Button
Cell_4_13 matlab.ui.control.Button
Cell_4_14 matlab.ui.control.Button
Cell_4_15 matlab.ui.control.Button
Cell_5_1 matlab.ui.control.Button
Cell_5_2 matlab.ui.control.Button
Cell_5_3 matlab.ui.control.Button
Cell_5_4 matlab.ui.control.Button
Cell_5_5 matlab.ui.control.Button
Cell_5_6 matlab.ui.control.Button
Cell_5_7 matlab.ui.control.Button
Cell_5_8 matlab.ui.control.Button
Cell_5_9 matlab.ui.control.Button
Cell_5_10 matlab.ui.control.Button
Cell_5_11 matlab.ui.control.Button
Cell_5_12 matlab.ui.control.Button
Cell_5_13 matlab.ui.control.Button
Cell_5_14 matlab.ui.control.Button
Cell_5_15 matlab.ui.control.Button
Cell_6_1 matlab.ui.control.Button
Cell_6_2 matlab.ui.control.Button
Cell_6_3 matlab.ui.control.Button
Cell_6_4 matlab.ui.control.Button
Cell_6_5 matlab.ui.control.Button
Cell_6_6 matlab.ui.control.Button
Cell_6_7 matlab.ui.control.Button
Cell_6_8 matlab.ui.control.Button
Cell_6_9 matlab.ui.control.Button
Cell_6_10 matlab.ui.control.Button
Cell_6_11 matlab.ui.control.Button
Cell_6_12 matlab.ui.control.Button
Cell_6_13 matlab.ui.control.Button
Cell_6_14 matlab.ui.control.Button
Cell_6_15 matlab.ui.control.Button
Cell_7_1 matlab.ui.control.Button
Cell_7_2 matlab.ui.control.Button
Cell_7_3 matlab.ui.control.Button
Cell_7_4 matlab.ui.control.Button
Cell_7_5 matlab.ui.control.Button
Cell_7_6 matlab.ui.control.Button
Cell_7_7 matlab.ui.control.Button
Cell_7_8 matlab.ui.control.Button
Cell_7_9 matlab.ui.control.Button
Cell_7_10 matlab.ui.control.Button
Cell_7_11 matlab.ui.control.Button
Cell_7_12 matlab.ui.control.Button
Cell_7_13 matlab.ui.control.Button
Cell_7_14 matlab.ui.control.Button
Cell_7_15 matlab.ui.control.Button
Cell_8_1 matlab.ui.control.Button
Cell_8_2 matlab.ui.control.Button
Cell_8_3 matlab.ui.control.Button
Cell_8_4 matlab.ui.control.Button
Cell_8_5 matlab.ui.control.Button
Cell_8_6 matlab.ui.control.Button
Cell_8_7 matlab.ui.control.Button
Cell_8_8 matlab.ui.control.Button
Cell_8_9 matlab.ui.control.Button
Cell_8_10 matlab.ui.control.Button
Cell_8_11 matlab.ui.control.Button
Cell_8_12 matlab.ui.control.Button
Cell_8_13 matlab.ui.control.Button
Cell_8_14 matlab.ui.control.Button
Cell_8_15 matlab.ui.control.Button
Cell_9_1 matlab.ui.control.Button
Cell_9_2 matlab.ui.control.Button
Cell_9_3 matlab.ui.control.Button
Cell_9_4 matlab.ui.control.Button
Cell_9_5 matlab.ui.control.Button
Cell_9_6 matlab.ui.control.Button
Cell_9_7 matlab.ui.control.Button
Cell_9_8 matlab.ui.control.Button
Cell_9_9 matlab.ui.control.Button
Cell_9_10 matlab.ui.control.Button
Cell_9_11 matlab.ui.control.Button
Cell_9_12 matlab.ui.control.Button
Cell_9_13 matlab.ui.control.Button
Cell_9_14 matlab.ui.control.Button
Cell_9_15 matlab.ui.control.Button
Cell_10_1 matlab.ui.control.Button
Cell_10_2 matlab.ui.control.Button
Cell_10_3 matlab.ui.control.Button
Cell_10_4 matlab.ui.control.Button
Cell_10_5 matlab.ui.control.Button
Cell_10_6 matlab.ui.control.Button
Cell_10_7 matlab.ui.control.Button
Cell_10_8 matlab.ui.control.Button
Cell_10_9 matlab.ui.control.Button
Cell_10_10 matlab.ui.control.Button
Cell_10_11 matlab.ui.control.Button
Cell_10_12 matlab.ui.control.Button
Cell_10_13 matlab.ui.control.Button
Cell_10_14 matlab.ui.control.Button
Cell_10_15 matlab.ui.control.Button
Cell_11_1 matlab.ui.control.Button
Cell_11_2 matlab.ui.control.Button
Cell_11_3 matlab.ui.control.Button
Cell_11_4 matlab.ui.control.Button
Cell_11_5 matlab.ui.control.Button
Cell_11_6 matlab.ui.control.Button
Cell_11_7 matlab.ui.control.Button
Cell_11_8 matlab.ui.control.Button
Cell_11_9 matlab.ui.control.Button
Cell_11_10 matlab.ui.control.Button
Cell_11_11 matlab.ui.control.Button
Cell_11_12 matlab.ui.control.Button
Cell_11_13 matlab.ui.control.Button
Cell_11_14 matlab.ui.control.Button
Cell_11_15 matlab.ui.control.Button
Cell_12_1 matlab.ui.control.Button
Cell_12_2 matlab.ui.control.Button
Cell_12_3 matlab.ui.control.Button
Cell_12_4 matlab.ui.control.Button
Cell_12_5 matlab.ui.control.Button
Cell_12_6 matlab.ui.control.Button
Cell_12_7 matlab.ui.control.Button
Cell_12_8 matlab.ui.control.Button
Cell_12_9 matlab.ui.control.Button
Cell_12_10 matlab.ui.control.Button
Cell_12_11 matlab.ui.control.Button
Cell_12_12 matlab.ui.control.Button
Cell_12_13 matlab.ui.control.Button
Cell_12_14 matlab.ui.control.Button
Cell_12_15 matlab.ui.control.Button
Cell_13_1 matlab.ui.control.Button
Cell_13_2 matlab.ui.control.Button
Cell_13_3 matlab.ui.control.Button
Cell_13_4 matlab.ui.control.Button
Cell_13_5 matlab.ui.control.Button
Cell_13_6 matlab.ui.control.Button
Cell_13_7 matlab.ui.control.Button
Cell_13_8 matlab.ui.control.Button
Cell_13_9 matlab.ui.control.Button
Cell_13_10 matlab.ui.control.Button
Cell_13_11 matlab.ui.control.Button
Cell_13_12 matlab.ui.control.Button
Cell_13_13 matlab.ui.control.Button
Cell_13_14 matlab.ui.control.Button
Cell_13_15 matlab.ui.control.Button
Cell_14_1 matlab.ui.control.Button
Cell_14_2 matlab.ui.control.Button
Cell_14_3 matlab.ui.control.Button
Cell_14_4 matlab.ui.control.Button
Cell_14_5 matlab.ui.control.Button
Cell_14_6 matlab.ui.control.Button
Cell_14_7 matlab.ui.control.Button
Cell_14_8 matlab.ui.control.Button
Cell_14_9 matlab.ui.control.Button
Cell_14_10 matlab.ui.control.Button
Cell_14_11 matlab.ui.control.Button
Cell_14_12 matlab.ui.control.Button
Cell_14_13 matlab.ui.control.Button
Cell_14_14 matlab.ui.control.Button
Cell_14_15 matlab.ui.control.Button
Cell_15_1 matlab.ui.control.Button
Cell_15_2 matlab.ui.control.Button
Cell_15_3 matlab.ui.control.Button
Cell_15_4 matlab.ui.control.Button
Cell_15_5 matlab.ui.control.Button
Cell_15_6 matlab.ui.control.Button
Cell_15_7 matlab.ui.control.Button
Cell_15_8 matlab.ui.control.Button
Cell_15_9 matlab.ui.control.Button
Cell_15_10 matlab.ui.control.Button
Cell_15_11 matlab.ui.control.Button
Cell_15_12 matlab.ui.control.Button
Cell_15_13 matlab.ui.control.Button
Cell_15_14 matlab.ui.control.Button
Cell_15_15 matlab.ui.control.Button
MinesweeperLabel matlab.ui.control.Label
end
properties (Access = private)
% Liczba pozostałych (nieoznaczonych flagą) bomb
mines = 0;
% Zawiera informację o komórkach gry
% (spacje przed "2 - jest postawiona.." były dodane dla cztelności)
% data(y, x, 1) == s
% data(y, x, 2) == n
% x - kolumna komórki
% y - wiersz komórki
% s - stan komórki (0 - zamknięta, 1 - otwarta, ...
% 2 - jest postawiona flaga)
% n - liczba bomb wokół komórki (-1 - bomba jest w tej komórce)
data = [];
% Poziom trudności gry
% 0 - easy (niski)
% 1 - medium (średni)
% 2 - hard (wysoki)
level = 1;
end
methods (Access = private)
function click_cell(app, button, pos_x, pos_y)
if get(app.FlagButton, "Value")
if app.data(pos_y, pos_x, 1) == 0
button.set("Icon", "flag_button.jpg");
app.data(pos_y, pos_x, 1) = 2;
app.mines = app.mines - 1;
elseif app.data(pos_y, pos_x, 1) == 2
button.set("Icon", "");
app.data(pos_y, pos_x, 1) = 0;
app.mines = app.mines + 1;
end
print_mines_left(app);
else
button.set("Enable", "off");
app.data(pos_y, pos_x, 1) = 1;
if app.data(pos_y, pos_x, 2) == -1
button.set("BackgroundColor", [1, 0, 0]);
game_lost(app);
else
open_field(app, pos_x, pos_y);
end
if sum(sum(app.data(:, :, 1) == 0)) == app.mines
game_won(app);
end
end
end
function init_data(app)
if app.level == 0
app.mines = 20;
elseif app.level == 1
app.mines = 50;
else
app.mines = 80;
end
app.data = zeros(15);
app.data(:,:,2) = app.data;
x = randi(15);
y = randi(15);
app.data(y, x, 2) = -1;
for i = 2:app.mines
while app.data(y, x, 2) == -1
x = randi(15);
y = randi(15);
end
app.data(y, x, 2) = -1;
end
fake_data = [zeros(1, 17); ...
zeros(15, 1), app.data(:, :, 2), zeros(15, 1); ...
zeros(1, 17)];
for x = 2:16
for y = 2:16
if app.data(y-1, x-1, 2) ~= -1
app.data(y-1, x-1, 2) = ...
-sum(sum(fake_data(y-1:y+1, x-1:x+1)));
end
end
end
end
function print_mines_left(app)
if app.mines <= 0
app.MinesLeft1.set("ImageSource", "0_mine.png");
app.MinesLeft2.set("ImageSource", "0_mine.png");
else
n = floor(app.mines/10);
app.MinesLeft1.set("ImageSource", int2str(n)+"_mine.png");
n = mod(app.mines, 10);
app.MinesLeft2.set("ImageSource", int2str(n)+"_mine.png");
end
end
function open_field(app, x, y)
to_open = zeros(15);
if app.data(y, x, 2) == 0
to_open(y, x) = 2;
else
to_open(y, x) = 1;
end
founded = true;
while founded
founded = false;
for x = 1:15
for y = 1:15
if to_open(y, x) > 0
cell = find_button_by_pos(app, x, y);
cell.set("Enable", "off");
if app.data(y, x, 1) == 2
cell.set("Icon", "");
app.mines = app.mines + 1;
print_mines_left(app);
end
app.data(y, x, 1) = 1;
if app.data(y, x, 2) > 0
n = app.data(y, x, 2);
cell.set("Icon", int2str(n)+".png");
end
if to_open(y, x) == 2
for j = max(x-1, 1):min(x+1, 15)
for i = max(y-1, 1):min(y+1, 15)
if to_open(i, j) == 0 && ...
app.data(i, j, 2) ~= -1
founded = true;
if app.data(i, j, 2) == 0
to_open(i, j) = 2;
else
to_open(i, j) = 1;
end
end
end
end
end
to_open(y, x) = -1;
end
end
end
end
end
function game_lost(app)
app.RestartButton.set("Icon", "lost.png");
app.MinesweeperLabel.set("Text", "Lost!");
for cell = findobj(app.Field, "Type", "uibutton")
cell.set("Enable", "off");
end
for x = 1:15
for y = 1:15
if app.data(y, x, 2) == -1
cell = find_button_by_pos(app, x, y);
cell.set("Icon", "mine.png");
end
end
end
end
function button = find_button_by_pos(app, pos_x, pos_y)
button = findobj(app.Field, "Type", "uibutton", ...
"Position", [(pos_x - 1)*20, 300 - pos_y*20, 20, 20]);
end
function game_won(app)
app.RestartButton.set("Icon", "won.png");
app.MinesweeperLabel.set("Text", "Won!");
for cell = findobj(app.Field, "Type", "uibutton")
cell.set("Enable", "off");
end
end
end
% Callbacks that handle component events
methods (Access = private)
% Code that executes after component creation
function startupFcn(app)
init_data(app);
print_mines_left(app);
end
% Selection changed function: ButtonGroup
function ButtonGroupSelectionChanged(app, event)
selectedButton = app.ButtonGroup.SelectedObject;
if selectedButton == app.CursorButton
state = "off";
else
state = "on";
end
flagged = findobj(app.Field, "Icon", "flag_button.jpg");
for cell = flagged
cell.set("Enable", state);
end
end
% Button pushed function: RestartButton
function RestartButtonPushed(app, event)
init_data(app);
print_mines_left(app);
app.RestartButton.set("Icon", "restart_button.jpg");
app.MinesweeperLabel.set("Text", "Minesweeper");
for cell = findobj(app.Field, "Type", "uibutton")
cell.set("Icon", "");
cell.set("Enable", "on");
cell.set("BackgroundColor", [0.96, 0.96, 0.96]);
end
end
% Value changed function: LevelChoice
function LevelChoiceValueChanged(app, event)
value = app.LevelChoice.Value;
if value == "Easy"
app.level = 0;
elseif value == "Medium"
app.level = 1;
else
app.level = 2;
end
end
% Button pushed function: Cell_1_1
function Cell_1_1ButtonPushed(app, event)
click_cell(app, app.Cell_1_1, 1, 1);
end
% Button pushed function: Cell_1_2
function Cell_1_2ButtonPushed(app, event)
click_cell(app, app.Cell_1_2, 2, 1);
end
% Button pushed function: Cell_1_3
function Cell_1_3ButtonPushed(app, event)
click_cell(app, app.Cell_1_3, 3, 1);
end
% Button pushed function: Cell_1_4
function Cell_1_4ButtonPushed(app, event)
click_cell(app, app.Cell_1_4, 4, 1);
end
% Button pushed function: Cell_1_5
function Cell_1_5ButtonPushed(app, event)
click_cell(app, app.Cell_1_5, 5, 1);
end
% Button pushed function: Cell_1_6
function Cell_1_6ButtonPushed(app, event)
click_cell(app, app.Cell_1_6, 6, 1);
end
% Button pushed function: Cell_1_7
function Cell_1_7ButtonPushed(app, event)
click_cell(app, app.Cell_1_7, 7, 1);
end
% Button pushed function: Cell_1_8
function Cell_1_8ButtonPushed(app, event)
click_cell(app, app.Cell_1_8, 8, 1);
end
% Button pushed function: Cell_1_9
function Cell_1_9ButtonPushed(app, event)
click_cell(app, app.Cell_1_9, 9, 1);
end
% Button pushed function: Cell_1_10
function Cell_1_10ButtonPushed(app, event)
click_cell(app, app.Cell_1_10, 10, 1);
end
% Button pushed function: Cell_1_11
function Cell_1_11ButtonPushed(app, event)
click_cell(app, app.Cell_1_11, 11, 1);
end
% Button pushed function: Cell_1_12
function Cell_1_12ButtonPushed(app, event)
click_cell(app, app.Cell_1_12, 12, 1);
end
% Button pushed function: Cell_1_13
function Cell_1_13ButtonPushed(app, event)
click_cell(app, app.Cell_1_13, 13, 1);
end
% Button pushed function: Cell_1_14
function Cell_1_14ButtonPushed(app, event)
click_cell(app, app.Cell_1_14, 14, 1);
end
% Button pushed function: Cell_1_15
function Cell_1_15ButtonPushed(app, event)
click_cell(app, app.Cell_1_15, 15, 1);
end
% Button pushed function: Cell_2_1
function Cell_2_1ButtonPushed(app, event)
click_cell(app, app.Cell_2_1, 1, 2);
end
% Button pushed function: Cell_2_2
function Cell_2_2ButtonPushed(app, event)
click_cell(app, app.Cell_2_2, 2, 2);
end
% Button pushed function: Cell_2_3
function Cell_2_3ButtonPushed(app, event)
click_cell(app, app.Cell_2_3, 3, 2);
end
% Button pushed function: Cell_2_4
function Cell_2_4ButtonPushed(app, event)
click_cell(app, app.Cell_2_4, 4, 2);
end
% Button pushed function: Cell_2_5
function Cell_2_5ButtonPushed(app, event)
click_cell(app, app.Cell_2_5, 5, 2);
end
% Button pushed function: Cell_2_6
function Cell_2_6ButtonPushed(app, event)
click_cell(app, app.Cell_2_6, 6, 2);
end
% Button pushed function: Cell_2_7
function Cell_2_7ButtonPushed(app, event)
click_cell(app, app.Cell_2_7, 7, 2);
end
% Button pushed function: Cell_2_8
function Cell_2_8ButtonPushed(app, event)
click_cell(app, app.Cell_2_8, 8, 2);
end
% Button pushed function: Cell_2_9
function Cell_2_9ButtonPushed(app, event)
click_cell(app, app.Cell_2_9, 9, 2);
end
% Button pushed function: Cell_2_10
function Cell_2_10ButtonPushed(app, event)
click_cell(app, app.Cell_2_10, 10, 2);
end
% Button pushed function: Cell_2_11
function Cell_2_11ButtonPushed(app, event)
click_cell(app, app.Cell_2_11, 11, 2);
end
% Button pushed function: Cell_2_12
function Cell_2_12ButtonPushed(app, event)
click_cell(app, app.Cell_2_12, 12, 2);
end
% Button pushed function: Cell_2_13
function Cell_2_13ButtonPushed(app, event)
click_cell(app, app.Cell_2_13, 13, 2);
end
% Button pushed function: Cell_2_14
function Cell_2_14ButtonPushed(app, event)
click_cell(app, app.Cell_2_14, 14, 2);
end
% Button pushed function: Cell_2_15
function Cell_2_15ButtonPushed(app, event)
click_cell(app, app.Cell_2_15, 15, 2);
end
% Button pushed function: Cell_3_1
function Cell_3_1ButtonPushed(app, event)
click_cell(app, app.Cell_3_1, 1, 3);
end
% Button pushed function: Cell_3_2
function Cell_3_2ButtonPushed(app, event)
click_cell(app, app.Cell_3_2, 2, 3);
end
% Button pushed function: Cell_3_3
function Cell_3_3ButtonPushed(app, event)
click_cell(app, app.Cell_3_3, 3, 3);
end
% Button pushed function: Cell_3_4
function Cell_3_4ButtonPushed(app, event)
click_cell(app, app.Cell_3_4, 4, 3);
end
% Button pushed function: Cell_3_5
function Cell_3_5ButtonPushed(app, event)
click_cell(app, app.Cell_3_5, 5, 3);
end
% Button pushed function: Cell_3_6
function Cell_3_6ButtonPushed(app, event)
click_cell(app, app.Cell_3_6, 6, 3);
end
% Button pushed function: Cell_3_7
function Cell_3_7ButtonPushed(app, event)
click_cell(app, app.Cell_3_7, 7, 3);
end
% Button pushed function: Cell_3_8
function Cell_3_8ButtonPushed(app, event)
click_cell(app, app.Cell_3_8, 8, 3);
end
% Button pushed function: Cell_3_9
function Cell_3_9ButtonPushed(app, event)
click_cell(app, app.Cell_3_9, 9, 3);
end
% Button pushed function: Cell_3_10
function Cell_3_10ButtonPushed(app, event)
click_cell(app, app.Cell_3_10, 10, 3);
end
% Button pushed function: Cell_3_11
function Cell_3_11ButtonPushed(app, event)
click_cell(app, app.Cell_3_11, 11, 3);
end
% Button pushed function: Cell_3_12
function Cell_3_12ButtonPushed(app, event)
click_cell(app, app.Cell_3_12, 12, 3);
end
% Button pushed function: Cell_3_13
function Cell_3_13ButtonPushed(app, event)
click_cell(app, app.Cell_3_13, 13, 3);
end
% Button pushed function: Cell_3_14
function Cell_3_14ButtonPushed(app, event)
click_cell(app, app.Cell_3_14, 14, 3);
end
% Button pushed function: Cell_3_15
function Cell_3_15ButtonPushed(app, event)
click_cell(app, app.Cell_3_15, 15, 3);
end
% Button pushed function: Cell_4_1
function Cell_4_1ButtonPushed(app, event)
click_cell(app, app.Cell_4_1, 1, 4);
end
% Button pushed function: Cell_4_2
function Cell_4_2ButtonPushed(app, event)
click_cell(app, app.Cell_4_2, 2, 4);
end
% Button pushed function: Cell_4_3
function Cell_4_3ButtonPushed(app, event)
click_cell(app, app.Cell_4_3, 3, 4);
end
% Button pushed function: Cell_4_4
function Cell_4_4ButtonPushed(app, event)
click_cell(app, app.Cell_4_4, 4, 4);
end
% Button pushed function: Cell_4_5
function Cell_4_5ButtonPushed(app, event)
click_cell(app, app.Cell_4_5, 5, 4);
end
% Button pushed function: Cell_4_6
function Cell_4_6ButtonPushed(app, event)
click_cell(app, app.Cell_4_6, 6, 4);
end
% Button pushed function: Cell_4_7
function Cell_4_7ButtonPushed(app, event)
click_cell(app, app.Cell_4_7, 7, 4);
end
% Button pushed function: Cell_4_8
function Cell_4_8ButtonPushed(app, event)
click_cell(app, app.Cell_4_8, 8, 4);
end
% Button pushed function: Cell_4_9
function Cell_4_9ButtonPushed(app, event)
click_cell(app, app.Cell_4_9, 9, 4);
end
% Button pushed function: Cell_4_10
function Cell_4_10ButtonPushed(app, event)
click_cell(app, app.Cell_4_10, 10, 4);
end
% Button pushed function: Cell_4_11
function Cell_4_11ButtonPushed(app, event)
click_cell(app, app.Cell_4_11, 11, 4);
end
% Button pushed function: Cell_4_12
function Cell_4_12ButtonPushed(app, event)
click_cell(app, app.Cell_4_12, 12, 4);
end
% Button pushed function: Cell_4_13
function Cell_4_13ButtonPushed(app, event)
click_cell(app, app.Cell_4_13, 13, 4);
end
% Button pushed function: Cell_4_14
function Cell_4_14ButtonPushed(app, event)
click_cell(app, app.Cell_4_14, 14, 4);
end
% Button pushed function: Cell_4_15
function Cell_4_15ButtonPushed(app, event)
click_cell(app, app.Cell_4_15, 15, 4);
end
% Button pushed function: Cell_5_1
function Cell_5_1ButtonPushed(app, event)
click_cell(app, app.Cell_5_1, 1, 5);
end
% Button pushed function: Cell_5_2
function Cell_5_2ButtonPushed(app, event)
click_cell(app, app.Cell_5_2, 2, 5);
end
% Button pushed function: Cell_5_3
function Cell_5_3ButtonPushed(app, event)
click_cell(app, app.Cell_5_3, 3, 5);
end
% Button pushed function: Cell_5_4
function Cell_5_4ButtonPushed(app, event)
click_cell(app, app.Cell_5_4, 4, 5);
end
% Button pushed function: Cell_5_5
function Cell_5_5ButtonPushed(app, event)
click_cell(app, app.Cell_5_5, 5, 5);
end
% Button pushed function: Cell_5_6
function Cell_5_6ButtonPushed(app, event)
click_cell(app, app.Cell_5_6, 6, 5);
end
% Button pushed function: Cell_5_7
function Cell_5_7ButtonPushed(app, event)
click_cell(app, app.Cell_5_7, 7, 5);
end
% Button pushed function: Cell_5_8
function Cell_5_8ButtonPushed(app, event)
click_cell(app, app.Cell_5_8, 8, 5);
end
% Button pushed function: Cell_5_9
function Cell_5_9ButtonPushed(app, event)
click_cell(app, app.Cell_5_9, 9, 5);
end
% Button pushed function: Cell_5_10
function Cell_5_10ButtonPushed(app, event)
click_cell(app, app.Cell_5_10, 10, 5);
end
% Button pushed function: Cell_5_11
function Cell_5_11ButtonPushed(app, event)
click_cell(app, app.Cell_5_11, 11, 5);
end
% Button pushed function: Cell_5_12
function Cell_5_12ButtonPushed(app, event)
click_cell(app, app.Cell_5_12, 12, 5);
end
% Button pushed function: Cell_5_13
function Cell_5_13ButtonPushed(app, event)
click_cell(app, app.Cell_5_13, 13, 5);
end
% Button pushed function: Cell_5_14
function Cell_5_14ButtonPushed(app, event)
click_cell(app, app.Cell_5_14, 14, 5);
end
% Button pushed function: Cell_5_15
function Cell_5_15ButtonPushed(app, event)
click_cell(app, app.Cell_5_15, 15, 5);
end
% Button pushed function: Cell_6_1
function Cell_6_1ButtonPushed(app, event)
click_cell(app, app.Cell_6_1, 1, 6);
end
% Button pushed function: Cell_6_2
function Cell_6_2ButtonPushed(app, event)
click_cell(app, app.Cell_6_2, 2, 6);
end
% Button pushed function: Cell_6_3
function Cell_6_3ButtonPushed(app, event)
click_cell(app, app.Cell_6_3, 3, 6);
end
% Button pushed function: Cell_6_4
function Cell_6_4ButtonPushed(app, event)
click_cell(app, app.Cell_6_4, 4, 6);
end
% Button pushed function: Cell_6_5
function Cell_6_5ButtonPushed(app, event)
click_cell(app, app.Cell_6_5, 5, 6);
end
% Button pushed function: Cell_6_6
function Cell_6_6ButtonPushed(app, event)
click_cell(app, app.Cell_6_6, 6, 6);
end
% Button pushed function: Cell_6_7
function Cell_6_7ButtonPushed(app, event)
click_cell(app, app.Cell_6_7, 7, 6);
end
% Button pushed function: Cell_6_8
function Cell_6_8ButtonPushed(app, event)
click_cell(app, app.Cell_6_8, 8, 6);
end
% Button pushed function: Cell_6_9
function Cell_6_9ButtonPushed(app, event)
click_cell(app, app.Cell_6_9, 9, 6);
end
% Button pushed function: Cell_6_10
function Cell_6_10ButtonPushed(app, event)
click_cell(app, app.Cell_6_10, 10, 6);
end
% Button pushed function: Cell_6_11
function Cell_6_11ButtonPushed(app, event)
click_cell(app, app.Cell_6_11, 11, 6);
end
% Button pushed function: Cell_6_12
function Cell_6_12ButtonPushed(app, event)
click_cell(app, app.Cell_6_12, 12, 6);
end
% Button pushed function: Cell_6_13
function Cell_6_13ButtonPushed(app, event)
click_cell(app, app.Cell_6_13, 13, 6);
end
% Button pushed function: Cell_6_14
function Cell_6_14ButtonPushed(app, event)
click_cell(app, app.Cell_6_14, 14, 6);
end
% Button pushed function: Cell_6_15
function Cell_6_15ButtonPushed(app, event)
click_cell(app, app.Cell_6_15, 15, 6);
end
% Button pushed function: Cell_7_1
function Cell_7_1ButtonPushed(app, event)
click_cell(app, app.Cell_7_1, 1, 7);
end
% Button pushed function: Cell_7_2
function Cell_7_2ButtonPushed(app, event)
click_cell(app, app.Cell_7_2, 2, 7);
end
% Button pushed function: Cell_7_3
function Cell_7_3ButtonPushed(app, event)
click_cell(app, app.Cell_7_3, 3, 7);
end
% Button pushed function: Cell_7_4
function Cell_7_4ButtonPushed(app, event)
click_cell(app, app.Cell_7_4, 4, 7);
end
% Button pushed function: Cell_7_5
function Cell_7_5ButtonPushed(app, event)
click_cell(app, app.Cell_7_5, 5, 7);
end
% Button pushed function: Cell_7_6
function Cell_7_6ButtonPushed(app, event)
click_cell(app, app.Cell_7_6, 6, 7);
end
% Button pushed function: Cell_7_7
function Cell_7_7ButtonPushed(app, event)
click_cell(app, app.Cell_7_7, 7, 7);
end
% Button pushed function: Cell_7_8
function Cell_7_8ButtonPushed(app, event)
click_cell(app, app.Cell_7_8, 8 ,7);
end
% Button pushed function: Cell_7_9
function Cell_7_9ButtonPushed(app, event)
click_cell(app, app.Cell_7_9, 9, 7);
end
% Button pushed function: Cell_7_10
function Cell_7_10ButtonPushed(app, event)
click_cell(app, app.Cell_7_10, 10, 7);
end
% Button pushed function: Cell_7_11
function Cell_7_11ButtonPushed(app, event)
click_cell(app, app.Cell_7_11, 11, 7);
end
% Button pushed function: Cell_7_12
function Cell_7_12ButtonPushed(app, event)
click_cell(app, app.Cell_7_12, 12, 7);
end
% Button pushed function: Cell_7_13
function Cell_7_13ButtonPushed(app, event)
click_cell(app, app.Cell_7_13, 13, 7);
end