-
Notifications
You must be signed in to change notification settings - Fork 1
/
GUI.txt
642 lines (558 loc) · 17.8 KB
/
GUI.txt
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
{renumber}
100 REM Creating interface
'go home and clear
101 PRINT "{home}"
101 PRINT "{clear}"
'Variables
{var:cursorBasePrice=bp} 'float
{var:cursorBasePriceStr$=bs$} 'string
{var:grandmaBasePrice=gp} 'float
{var:grandmaBasePriceStr$=gs$} 'string
{var:factoryBasePrice=fp} 'float
{var:factoryBasePriceStr$=fs$} 'string
{var:mineBasePrice=mp} 'float
{var:mineBasePriceStr$=ms$} 'string
{var:shipmentBasePrice=sp} 'float
{var:shipmentBasePriceStr$=ss$} 'string
{var:alchemyLabBasePrice=ap} 'float
{var:alchemyLabBasePriceStr$=as$} 'string
{var:portalBasePrice=pp} 'float
{var:portalBasePriceStr$=ps$} 'string
{var:timeMachineBasePrice=tp} 'float
{var:timeMachineBasePriceStr$=ts$} 'string
{var:cursorQty%=bq} 'int
{var:cursorQtyStr$=bz$} 'string
{var:grandmaQty%=gq} 'int
{var:grandmaQtyStr$=gz$} 'string
{var:factoryQty%=fq} 'int
{var:factoryQtyStr$=fz$} 'string
{var:mineQty%=mq} 'int
{var:mineQtyStr$=mz$} 'string
{var:shipmentQty%=sq} 'int
{var:shipmentQtyStr$=sz$} 'string
{var:alchemyLabQty%=aq} 'int
{var:alchemyLabQtyStr$=az$} 'string
{var:portalQty%=pq} 'int
{var:portalQtyStr$=pz$} 'string
{var:timeMachineQty%=tq} 'int
{var:timeMachineQtyStr$=tz$} 'string
101 {var:cursorBasePrice} = 15
101 {var:grandmaBasePrice} = 100
101 {var:factoryBasePrice} = 500
101 {var:mineBasePrice} = 2000
101 {var:shipmentBasePrice} = 7000
101 {var:alchemyLabBasePrice} = 50000
101 {var:portalBasePrice} = 1000000
101 {var:timeMachineBasePrice} = 123456789
101 {var:cursorQty%} = 0
101 {var:grandmaQty%} = 0
101 {var:factoryQty%} = 0
101 {var:mineQty%} = 0
101 {var:shipmentQty%} = 0
101 {var:alchemyLabQty%} = 0
101 {var:portalQty%} = 0
101 {var:timeMachineQty%} = 0
101 {var:cursorBasePriceStr$} = STR$({var:cursorBasePrice})
101 {var:grandmaBasePriceStr$} = STR$({var:grandmaBasePrice})
101 {var:factoryBasePriceStr$} = STR$({var:factoryBasePrice})
101 {var:mineBasePriceStr$} = STR$({var:mineBasePrice})
101 {var:shipmentBasePriceStr$} = STR$({var:shipmentBasePrice})
101 {var:alchemyLabBasePriceStr$} = STR$({var:alchemyLabBasePrice})
101 {var:portalBasePriceStr$} = STR$({var:portalBasePrice})
101 {var:timeMachineBasePriceStr$} = STR$({var:timeMachineBasePrice})
101 {var:cursorQtyStr$} = STR$({var:cursorQty%})
101 {var:grandmaQtyStr$} = STR$({var:grandmaQty%})
101 {var:factoryQtyStr$} = STR$({var:factoryQty%})
101 {var:mineQtyStr$} = STR$({var:mineQty%})
101 {var:shipmentQtyStr$} = STR$({var:shipmentQty%})
101 {var:alchemyLabQtyStr$} = STR$({var:alchemyLabQty%})
101 {var:portalQtyStr$} = STR$({var:portalQty%})
101 {var:timeMachineQtyStr$} = STR$({var:timeMachineQty%})
101 {var:cookies=co}
101 {var:cookiesStr$=cz$}
101 {var:time%=tt}
101 TP$ = "Price"
'Cell 1
101 POKE (1024+20),85
101 POKE (1024+21),67
101 POKE (1024+22),67
101 POKE (1024+23),67
101 POKE (1024+24),67
101 POKE (1024+25),67
101 POKE (1024+26),67
101 POKE (1024+27),67
101 POKE (1024+28),67
101 POKE (1024+29),67
101 POKE (1024+30),67
101 POKE (1024+31),67
101 POKE (1024+32),67
101 POKE (1024+33),67
101 POKE (1024+34),67
101 POKE (1024+35),67
101 POKE (1024+36),67
101 POKE (1024+37),67
101 POKE (1024+38),67
101 POKE (1024+39),73
101 POKE (1024+20+40*1),66 'sides of cell'
101 T1$ = "1-CURSOR"
101 FOR T=0 TO LEN(T1$)-1
101 POKE (1024+21+40*1)+T,ASC(MID$(T1$,T+1,1)) AND 63
101 NEXT T
101 POKE (1024+38+40*1),48 'poke 0'
101 poke (1024+39+40*1),66 'sides of cell'
101 POKE (1024+20+40*2),66 'sides of cell'
101 FOR T=0 TO LEN(TP$)-1
101 POKE (1024+22+40*2)+T,ASC(MID$(TP$,T+1,1)) AND 63
101 NEXT T
101 GOSUB 5020 'poke_cursor_base_price
101 poke (1024+39+40*2),66 'sides of cell'
'Cell 2 (grandma)
101 poke (1024+20+40*3),107
101 POKE (1024+21+40*3),67
101 POKE (1024+22+40*3),67
101 POKE (1024+23+40*3),67
101 POKE (1024+24+40*3),67
101 POKE (1024+25+40*3),67
101 POKE (1024+26+40*3),67
101 POKE (1024+27+40*3),67
101 POKE (1024+28+40*3),67
101 POKE (1024+29+40*3),67
101 POKE (1024+30+40*3),67
101 POKE (1024+31+40*3),67
101 POKE (1024+32+40*3),67
101 POKE (1024+33+40*3),67
101 POKE (1024+34+40*3),67
101 POKE (1024+35+40*3),67
101 POKE (1024+36+40*3),67
101 POKE (1024+37+40*3),67
101 POKE (1024+38+40*3),67
101 poke (1024+39+40*3),115
101 POKE (1024+20+40*4),66 'sides of cell'
101 T2$ = "2-GRANDMA"
101 FOR T=0 TO LEN(T2$)-1
101 POKE (1024+21+40*4)+T,ASC(MID$(T2$,T+1,1)) AND 63
101 NEXT T
101 POKE (1024+38+40*4),48 'poke 0'
101 poke (1024+39+40*4),66 'sides of cell'
101 POKE (1024+20+40*5),66 'sides of cell'
101 FOR T=0 TO LEN(TP$)-1
101 POKE (1024+22+40*5)+T,ASC(MID$(TP$,T+1,1)) AND 63
101 NEXT T
101 GOSUB 5120 'poke_grandma_base_price
101 poke (1024+39+40*5),66 'sides of cell'
'Cell 3 (factory)
101 poke (1024+20+40*6),107
101 POKE (1024+21+40*6),67
101 POKE (1024+22+40*6),67
101 POKE (1024+23+40*6),67
101 POKE (1024+24+40*6),67
101 POKE (1024+25+40*6),67
101 POKE (1024+26+40*6),67
101 POKE (1024+27+40*6),67
101 POKE (1024+28+40*6),67
101 POKE (1024+29+40*6),67
101 POKE (1024+30+40*6),67
101 POKE (1024+31+40*6),67
101 POKE (1024+32+40*6),67
101 POKE (1024+33+40*6),67
101 POKE (1024+34+40*6),67
101 POKE (1024+35+40*6),67
101 POKE (1024+36+40*6),67
101 POKE (1024+37+40*6),67
101 POKE (1024+38+40*6),67
101 poke (1024+39+40*6),115
101 POKE (1024+20+40*7),66 'sides of cell'
101 T3$ = "3-FACTORY"
101 FOR T=0 TO LEN(T3$)-1
101 POKE (1024+21+40*7)+T,ASC(MID$(T3$,T+1,1)) AND 63
101 NEXT T
101 POKE (1024+38+40*7),48
101 poke (1024+39+40*7),66 'sides of cell'
101 POKE (1024+20+40*8),66 'sides of cell'
101 FOR T=0 TO LEN(TP$)-1
101 POKE (1024+22+40*8)+T,ASC(MID$(TP$,T+1,1)) AND 63
101 NEXT T
101 GOSUB 5220 'poke_factory_base_price
101 poke (1024+39+40*8),66 'sides of cell'
'Cell 4 (mine)
101 poke (1024+20+40*9),91
101 POKE (1024+21+40*9),67
101 POKE (1024+22+40*9),67
101 POKE (1024+23+40*9),67
101 POKE (1024+24+40*9),67
101 POKE (1024+25+40*9),67
101 POKE (1024+26+40*9),67
101 POKE (1024+27+40*9),67
101 POKE (1024+28+40*9),67
101 POKE (1024+29+40*9),67
101 POKE (1024+30+40*9),67
101 POKE (1024+31+40*9),67
101 POKE (1024+32+40*9),67
101 POKE (1024+33+40*9),67
101 POKE (1024+34+40*9),67
101 POKE (1024+35+40*9),67
101 POKE (1024+36+40*9),67
101 POKE (1024+37+40*9),67
101 POKE (1024+38+40*9),67
101 poke (1024+39+40*9),115
101 POKE (1024+20+40*10),66 'side of cell'
101 T4$ = "4-MINE"
101 FOR T=0 TO LEN(T4$)-1
101 POKE (1024+21+40*10)+T,ASC(MID$(T4$,T+1,1)) AND 63
101 NEXT T
101 POKE (1024+38+40*10),48 'poke 0'
101 poke (1024+39+40*10),66 'side of cell'
101 POKE (1024+20+40*11),66 'side of cell'
101 FOR T=0 TO LEN(TP$)-1
101 POKE (1024+22+40*11)+T,ASC(MID$(TP$,T+1,1)) AND 63
101 NEXT T
101 GOSUB 5320 'poke_mine_base_price
101 poke (1024+39+40*11),66 'side of cell'
'Cell 5 (shipment)
101 poke (1024+20+40*12),107
101 POKE (1024+21+40*12),67
101 POKE (1024+22+40*12),67
101 POKE (1024+23+40*12),67
101 POKE (1024+24+40*12),67
101 POKE (1024+25+40*12),67
101 POKE (1024+26+40*12),67
101 POKE (1024+27+40*12),67
101 POKE (1024+28+40*12),67
101 POKE (1024+29+40*12),67
101 POKE (1024+30+40*12),67
101 POKE (1024+31+40*12),67
101 POKE (1024+32+40*12),67
101 POKE (1024+33+40*12),67
101 POKE (1024+34+40*12),67
101 POKE (1024+35+40*12),67
101 POKE (1024+36+40*12),67
101 POKE (1024+37+40*12),67
101 POKE (1024+38+40*12),67
101 poke (1024+39+40*12),115
101 POKE (1024+20+40*13),66 'side of cell'
101 T5$ = "5-SHIPMENT"
101 FOR T=0 TO LEN(T5$)-1
101 POKE (1024+21+40*13)+T,ASC(MID$(T5$,T+1,1)) AND 63
101 NEXT T
101 POKE (1024+38+40*13),48
101 poke (1024+39+40*13),66 'side of cell'
101 POKE (1024+20+40*14),66 'side of cell'
101 FOR T=0 TO LEN(TP$)-1
101 POKE (1024+22+40*14)+T,ASC(MID$(TP$,T+1,1)) AND 63
101 NEXT T
101 GOSUB 5420 'poke_shipment_base_price
101 poke (1024+39+40*14),66 'side of cell'
'Cell 6 (alchemy lab)
101 poke (1024+20+40*15),107
101 POKE (1024+21+40*15),67
101 POKE (1024+22+40*15),67
101 POKE (1024+23+40*15),67
101 POKE (1024+24+40*15),67
101 POKE (1024+25+40*15),67
101 POKE (1024+26+40*15),67
101 POKE (1024+27+40*15),67
101 POKE (1024+28+40*15),67
101 POKE (1024+29+40*15),67
101 POKE (1024+30+40*15),67
101 POKE (1024+31+40*15),67
101 POKE (1024+32+40*15),67
101 POKE (1024+33+40*15),67
101 POKE (1024+34+40*15),67
101 POKE (1024+35+40*15),67
101 POKE (1024+36+40*15),67
101 POKE (1024+37+40*15),67
101 POKE (1024+38+40*15),67
101 poke (1024+39+40*15),115
101 POKE (1024+20+40*16),66 'sides of cell'
101 T6$ = "6-ALCHEMY LAB"
101 FOR T=0 TO LEN(T6$)-1
101 POKE (1024+21+40*16)+T,ASC(MID$(T6$,T+1,1)) AND 63
101 NEXT T
101 POKE (1024+38+40*16),48
101 poke (1024+39+40*16),66 'sides of cell'
101 POKE (1024+20+40*17),66 'sides of cell'
101 FOR T=0 TO LEN(TP$)-1
101 POKE (1024+22+40*17)+T,ASC(MID$(TP$,T+1,1)) AND 63
101 NEXT T
101 GOSUB 5520 'poke_alchemylab_base_price
101 poke (1024+39+40*17),66 'sides of cell'
'Cell 7 (portal)
101 poke (1024+20+40*18),107
101 POKE (1024+21+40*18),67
101 POKE (1024+22+40*18),67
101 POKE (1024+23+40*18),67
101 POKE (1024+24+40*18),67
101 POKE (1024+25+40*18),67
101 POKE (1024+26+40*18),67
101 POKE (1024+27+40*18),67
101 POKE (1024+28+40*18),67
101 POKE (1024+29+40*18),67
101 POKE (1024+30+40*18),67
101 POKE (1024+31+40*18),67
101 POKE (1024+32+40*18),67
101 POKE (1024+33+40*18),67
101 POKE (1024+34+40*18),67
101 POKE (1024+35+40*18),67
101 POKE (1024+36+40*18),67
101 POKE (1024+37+40*18),67
101 POKE (1024+38+40*18),67
101 poke (1024+39+40*18),115
101 POKE (1024+20+40*19),66 'side of cell'
101 T7$ = "7-PORTAL"
101 FOR T=0 TO LEN(T7$)-1
101 POKE (1024+21+40*19)+T,ASC(MID$(T7$,T+1,1)) AND 63
101 NEXT T
101 POKE (1024+38+40*19),48
101 poke (1024+39+40*19),66 'side of cell'
101 POKE (1024+20+40*20),66 'side of cell'
101 FOR T=0 TO LEN(TP$)-1
101 POKE (1024+22+40*20)+T,ASC(MID$(TP$,T+1,1)) AND 63
101 NEXT T
101 GOSUB 5620 'poke_portal_base_price
101 poke (1024+39+40*20),66 'side of cell'
'Cell 8 (time machine)
101 poke (1024+20+40*21),107
101 POKE (1024+21+40*21),67
101 POKE (1024+22+40*21),67
101 POKE (1024+23+40*21),67
101 POKE (1024+24+40*21),67
101 POKE (1024+25+40*21),67
101 POKE (1024+26+40*21),67
101 POKE (1024+27+40*21),67
101 POKE (1024+28+40*21),67
101 POKE (1024+29+40*21),67
101 POKE (1024+30+40*21),67
101 POKE (1024+31+40*21),67
101 POKE (1024+32+40*21),67
101 POKE (1024+33+40*21),67
101 POKE (1024+34+40*21),67
101 POKE (1024+35+40*21),67
101 POKE (1024+36+40*21),67
101 POKE (1024+37+40*21),67
101 POKE (1024+38+40*21),67
101 poke (1024+39+40*21),115
101 POKE (1024+20+40*22),66 'side of cell'
101 T8$ = "8-TIME MACHINE"
101 FOR T=0 TO LEN(T8$)-1
101 POKE (1024+21+40*22)+T,ASC(MID$(T8$,T+1,1)) AND 63
101 NEXT T
101 POKE (1024+38+40*22),48
101 poke (1024+39+40*22),66 'side of cell'
101 POKE (1024+20+40*23),66 'side of cell'
101 FOR T=0 TO LEN(TP$)-1
101 POKE (1024+22+40*23)+T,ASC(MID$(TP$,T+1,1)) AND 63
101 NEXT T
101 GOSUB 5720 'poke_timemachine_base_price
101 poke (1024+39+40*23),66 'side of cell'
'last line
101 poke (1024+20+40*24),113
101 POKE (1024+21+40*24),67
101 POKE (1024+22+40*24),67
101 POKE (1024+23+40*24),67
101 POKE (1024+24+40*24),67
101 POKE (1024+25+40*24),67
101 POKE (1024+26+40*24),67
101 POKE (1024+27+40*24),67
101 POKE (1024+28+40*24),67
101 POKE (1024+29+40*24),67
101 POKE (1024+30+40*24),67
101 POKE (1024+31+40*24),67
101 POKE (1024+32+40*24),67
101 POKE (1024+33+40*24),67
101 POKE (1024+34+40*24),67
101 POKE (1024+35+40*24),67
101 POKE (1024+36+40*24),67
101 POKE (1024+37+40*24),67
101 POKE (1024+38+40*24),67
101 poke (1024+39+40*24),75
'left zone
101 poke (1024+0+40*9),85
101 poke (1024+1+40*9),67
101 poke (1024+2+40*9),67
101 poke (1024+3+40*9),67
101 poke (1024+4+40*9),67
101 poke (1024+5+40*9),67
101 poke (1024+6+40*9),67
101 poke (1024+7+40*9),67
101 poke (1024+8+40*9),67
101 poke (1024+9+40*9),67
101 poke (1024+10+40*9),67
101 poke (1024+11+40*9),67
101 poke (1024+12+40*9),67
101 poke (1024+13+40*9),67
101 poke (1024+14+40*9),67
101 poke (1024+15+40*9),67
101 poke (1024+16+40*9),67
101 poke (1024+17+40*9),67
101 poke (1024+18+40*9),67
101 poke (1024+19+40*9),67
101 poke (1024+0+40*10),93
101 poke (1024+0+40*11),93
101 poke (1024+0+40*12),93
101 poke (1024+0+40*13),93
101 poke (1024+0+40*14),93
101 poke (1024+0+40*15),93
101 poke (1024+0+40*16),93
101 poke (1024+0+40*17),93
101 poke (1024+0+40*18),93
101 poke (1024+0+40*19),93
101 poke (1024+0+40*20),93
101 poke (1024+0+40*21),93
101 poke (1024+0+40*22),93
101 poke (1024+0+40*23),93
101 poke (1024+0+40*24),74
101 poke (1024+1+40*24),67
101 poke (1024+2+40*24),67
101 poke (1024+3+40*24),67
101 poke (1024+4+40*24),67
101 poke (1024+5+40*24),67
101 poke (1024+6+40*24),67
101 poke (1024+7+40*24),67
101 poke (1024+8+40*24),67
101 poke (1024+9+40*24),67
101 poke (1024+10+40*24),67
101 poke (1024+11+40*24),67
101 poke (1024+12+40*24),67
101 poke (1024+13+40*24),67
101 poke (1024+14+40*24),67
101 poke (1024+15+40*24),67
101 poke (1024+16+40*24),67
101 poke (1024+17+40*24),67
101 poke (1024+18+40*24),67
101 poke (1024+19+40*24),67
101 TC$ = "COOKIES"
101 FOR T=0 TO LEN(TC$)-1
101 POKE (1024+6+40*2)+T,ASC(MID$(TC$,T+1,1)) AND 63
101 NEXT T
101 TK$ = "Press space to bake"
101 FOR T=0 TO LEN(TK$)-1
101 POKE (1024+1+40*6)+T,ASC(MID$(TK$,T+1,1)) AND 63
101 NEXT T
101 {var:time%} = INT(TIME/60)
'Begining of incrementing program
210 {var:cookies} = 0
210 {var:cursorBasePrice} = 15 'Base price 1st building (float)
210 {var:cursorQty%} = 0 '1st Building counter (int)
1000 GET K$
1000 GOSUB 6000 'print_cookies_fct
1001 IF K$ = " " THEN GOSUB 2000: GOTO 1000 'Watch if space is pressed
1002 IF K$ = "1" AND {var:cookies} > {var:cursorBasePrice} THEN GOSUB 4000 'Watch if can buy Building 1 (cursor)
1002 IF K$ = "2" AND {var:cookies} > {var:grandmaBasePrice} THEN GOSUB 4100 'Watch if can buy Building 1 (grandma)
1002 GOSUB 3000 'increment_fct
1998 GOTO 1000
1999 END
'increment_cookie_space'
2000 {var:cookies} = {var:cookies} + 1
2999 RETURN
'end increment_cookie_space'
'print_cookies_fct
'Print total COOKIES'
3000 {var:cookiesStr$} = STR$({var:cookies})
3002 FOR T=0 TO LEN({var:cookiesStr$})-1 'print num of cookies
3003 POKE (1024+5+40*4)+T,ASC(MID$({var:cookiesStr$},T+1,1)) AND 63 'print num of cookies
3004 NEXT T 'return at begining of loop
3199 RETURN
'end print_cookies_fct
'building_cursor_logic'
'substitute cookies, add buildings, call POKEing fct etc.'
4000 {var:cookies} = {var:cookies} - {var:cursorBasePrice} 'buy the building
4003 {var:cursorQty%} = {var:cursorQty%} + 1 'increment building´s counter
4004 {var:cursorBasePrice} = {var:cursorBasePrice} + (({var:cursorBasePrice}/100)*15) 'increment building´s price
'poke on building zone
4005 {var:cursorQtyStr$} = STR$({var:cursorQty%})
4006 {var:cursorBasePriceStr$} = STR$({var:cursorBasePrice})
4010 L = LEN({var:cursorQtyStr$})-1
4011 FOR T=0 TO L 'print num of buildings
4012 POKE (1024+36+40*1)+L+T,ASC(MID$({var:cursorQtyStr$},T+1,1)) AND 63 'print num of buildings
4013 NEXT T 'return at begining of loop
4014 L = 0
4015 GOSUB 5020 'call poke_cursor_base_price'
4099 RETURN
'end building_cursor_logic'
'building_grandma_logic'
'substitute cookies, add buildings, call POKEing fct etc.'
4100 {var:cookies} = {var:cookies} - {var:grandmaBasePrice} 'buy the building
4103 {var:grandmaQty%} = {var:grandmaQty%} + 1 'increment building´s counter
4104 {var:grandmaBasePrice} = {var:grandmaBasePrice} + (({var:grandmaBasePrice}/100)*10) 'increment building´s price
'poke on building zone
4105 {var:grandmaQtyStr$} = STR$({var:grandmaQty%})
4106 {var:grandmaBasePriceStr$} = STR$({var:grandmaBasePrice})
4110 L = LEN({var:grandmaQtyStr$})-1
4111 FOR T=0 TO L 'print num of buildings
4112 POKE (1024+36+40*4)+L+T,ASC(MID$({var:grandmaQtyStr$},T+1,1)) AND 63 'print num of buildings
4113 NEXT T 'return at begining of loop
4114 L = 0
4115 GOSUB 5120 'call poke_grandma_base_price'
4199 RETURN
'end building_grandma_logic'
'*********************************************'
'*** POKEing functions ***********************'
'*********************************************'
'poke_cursor_base_price
5020 L = LEN({var:cursorBasePriceStr$})-1
5021 FOR T=0 TO L 'print price
5022 POKE (1024+38+40*2)-L+T,ASC(MID$({var:cursorBasePriceStr$},T+1,1)) AND 63 'print num of buildings
5023 NEXT T
5024 L = 0
5025 RETURN
'end poke_cursor_base_price
'poke_grandma_base_price
5120 L = LEN({var:grandmaBasePriceStr$})-1
5121 FOR T=0 TO L 'print price
5122 POKE (1024+38+40*5)-L+T,ASC(MID$({var:grandmaBasePriceStr$},T+1,1)) AND 63 'print num of buildings
5123 NEXT T
5124 L = 0
5125 RETURN
'end poke_grandma_base_price
'poke_factory_base_price
5220 L = LEN({var:factoryBasePriceStr$})-1
5221 FOR T=0 TO L 'print price
5222 POKE ((1024+38+40*8)-L)+T,ASC(MID$({var:factoryBasePriceStr$},T+1,1)) AND 63 'print num of buildings
5223 NEXT T
5224 L = 0
5225 RETURN
'end poke_factory_base_price
'poke_mine_base_price
5320 L = LEN({var:mineBasePriceStr$})-1
5321 FOR T=0 TO L 'print price
5322 POKE (1024+38+40*11)-L+T,ASC(MID$({var:mineBasePriceStr$},T+1,1)) AND 63 'print num of buildings
5323 NEXT T
5324 L = 0
5325 RETURN
'end poke_mine_base_price
'poke_shipment_base_price
5420 L = LEN({var:shipmentBasePriceStr$})-1
5421 FOR T=0 TO L 'print price
5422 POKE (1024+38+40*14)-L+T,ASC(MID$({var:shipmentBasePriceStr$},T+1,1)) AND 63 'print num of buildings
5423 NEXT T
5424 L = 0
5425 RETURN
'end poke_shipment_base_price
'poke_alchemylab_base_price
5520 L = LEN({var:alchemyLabBasePriceStr$})-1
5521 FOR T=0 TO L 'print price
5522 POKE (1024+38+40*17)-L+T,ASC(MID$({var:alchemyLabBasePriceStr$},T+1,1)) AND 63 'print num of buildings
5523 NEXT T
5524 L = 0
5525 RETURN
'end poke_alchemylab_base_price
'poke_portal_base_price
5620 L = LEN({var:portalBasePriceStr$})-1
5621 FOR T=0 TO L
5622 POKE ((1024+38+40*20)-L)+T,ASC(MID$({var:portalBasePriceStr$},T+1,1)) AND 63 'print num of buildings
5623 NEXT T
5624 L = 0
5625 RETURN
'end poke_portal_base_price
'poke_timemachine_base_price
5720 L = LEN({var:timeMachineBasePriceStr$})-1
5721 FOR T=0 TO L 'print price
5722 POKE (1024+38+40*23)-L+T,ASC(MID$({var:timeMachineBasePriceStr$},T+1,1)) AND 63 'print num of buildings
5723 NEXT T
5724 L = 0
5725 RETURN
'end poke_timemachine_base_price
'print_cookies_fct
6000
6001
'end print_cookies_fct