Login
LOGITrumps C16
Title:LOGITrumps C16
Category:Game/Trivia
Release Date:
Language:English
Size:16K
Machine:PAL & NTSC
Code Type:Basic
Distribution:Freeware
 Play Online!
Code by:Logiker
Notes:Available on many other platforms.
User Rating: 4.5/10 (2 votes)
LOGITrumps C16 Screenshot


Publications
Source: K&A Plus 16 (Magazine/Polish) pg. 39


Compos
ComposCategoryRankScoreNotes
BASIC 10 Liners 2020PUR-80695,00


Description
LOGITrumps

A card game for the Commodore C16 and Plus/4.

DESCRIPTION
LogiTrumps is a trump card game with retro computers. It’s like we used to play it in the 80ies. Each player (you and the computer) gets the same number of cards. Each card represents a retro computer and has several values like year, memory and colours. Each card has its strengths and weaknesses. If a computer has a lot of memory or colours, he usually is not that old and therefor would likely loose in the year category. Usually the higher value wins. The year category is the only category where the lower value wins. The player who gets all cards first wins the game.

HOW TO PLAY
At the beginning of the game the cards are shuffled. You and the computer get the same number of cards. You can choose a category by typing the corresponding number. The program will calculate weather you won, lose or make a draw against the computers card. If you win, you get the computers card. If you lose the computer gets your card. If it’s a draw you keep your cards and just continue with the next card. If it’s the computers turn you can just watch what the computer choses and what happens.

EMULATOR USAGE
Run the program with vice's xplus4.exe. (You may use drag and drop.)

VARIABLES AND DATA STRUCTURES
Variable Usage
u Users turn (1) or computer (0)
p[] Person’s array for position of cards
c[] Computer’s array for position of cards
r Number of cards of person
e Number of cards of computer
t$[] Name of cards
a(card, factor) Factors of the cards
p Current position/card of person
c Current position/card of computer
n Round
b Selected factor
z Factor to print
p$ Dummy for wait key


CODE
1clr:dAZX80,-1980,1,2,Amiga500,-1987,512,4096,CPC464,-1984,64,27,Atari400,-1979
2dA8,128,TI99/4a,-1981,16,16,VC20,-1980,5,16,C-64,-1982,64,16,C=128,-1985,128,16
3?"{clear}{black}{reverse on}logi{reverse off}trumps{down}":u=1:r=4:e=4:fOi=0to7:rEt$(i):fOf=0to2:rEa(i,f):nE:color0,5
4z=-(rN(0)*(c<4)>rN(0)*(p<4)):p=p+z:c=c+1-z:p(i)=p*z:c(i)=c*(1-z):nE:color4,1
5n=n+1:p=0:c=0:fOi=0to7:c=c-(c(i)=n)*i:p=p-(p(i)=n)*i:nE:b=-(a(c,2)>16)*2
6?r":"e:?"{blue}"t$(p)"{return} 1)"a(p,0)*-1"{return} 2)"a(p,1)"kb{return} 3)"a(p,2)"col{black}":ifutHinputb:b=b-1
7?"{pink}"t$(c)a(c,0)*-1a(c,1)"kb"a(c,2)"col{black} "b+1"{down}"
8p(p)=n+r:c(c)=n+e:ifa(p,b)>a(c,b)tH?"{green}{reverse on}:-){reverse off}":p(c)=n+r+1:c(c)=0:r=r+1:e=e-1:u=1
9ifa(p,b)10on(r>0)*(e>0)gO5:?r":"e:ifrthen?"won":getkeyp$:gO1:else ?"lost":getkeyp$:gO1


CODE DESCRIPTION
1-2 Clear screen. Cards data.
3 Set up the screen. Initialize variables. Read the cards into variables.
4 Shuffle the cards. Set background color.
5 Set/advance current card. Get the currently playing card’s positions. Calculate the selected category (for the computer player).
6 Print the user’s card. Ask the user if it’s his turn for the category.
7 Print computers card. Some variables hat to be put here.
8 Check if turn won and adapt cards and cards count.
9 Check if turn lost and adapt cards and cards count. Wait for a key.
10 If not over, continue in 5. Otherwise: Print stats and won/lost. Wait for a key. Re-run.

Copyright © Plus/4 World Team, 2001-2024