RUBIK CODE
----------

For the 48K ZX Spectrum


By Andy 'uglifruit' Jenkinson

For the C.C.S.Crap Games Competition 2021


No, no, no!  It's not related to Rubik's Code (the toy by the company made famous by Ernõ Rubik and his cube).  Neither is it related to Rubik's Code (the AI software development company).

In fact, it is inspired by something I read in the "Explorer's guide to the ZX Spectrum and ZX81" (1983) by Kasper Boon.

Kasper mentions, in the preface to his game "Flat Cube" (pg. 203) that this it is an implementation of something he's first seen on a CASIO Calculator.  Which is possible - indeed he uses the number grid as input.  But I do wonder how a calculator might have displayed the 3x3 matrix of numbers. 

It should be noted that Kasper also claims, (on page 229) that PLOT C,M,N is the correct Spectrum syntax - with C being 'optional' and denoting the colour.  So I don't necessarily trust Kasper.

Anyway back to "Flat Cube".  He confusingly describes the rules, and then presents a short program that'll play it.  He casually warns that "This is certainly an exasperating game."  But I took no heed, and launched into seeing if I could write a version, just from the rules (rather than using his code).

But ... Oh good heaven's it's nigh on impossible!  And not fun in the slightest.

Of course I didn't realise this until I'd thrown myself into it, and started work on a front end, and nice graphical way of representing things (within the confines of BASIC, anyway).


Rules:
You are presented with a grid of numbers:

Eg :

	4	3	1
	
	5	1	0

	2	2	0

By pressing The following keys...

	Q	W	E
	
	A	S	D

	Z	X	C

... you can increase the value of every number in that particular ROW and COLUMN, however increasing past 5 takes you to 0.

So pressing Q in the above instance would lead to

	5	4	2
	
	0	1	0

	3	2	0
	
You are tasked with making all of the numbers 0.

To aid you I've also included "CAPS SHIFT"ed version that 'Decrease' by one (using the same rules).  Which might save you some time.


But in honesty, you'll give up.


This is just too hard, and despite it's superficial similarity to "Lights Out" or similar, I just find it far far far too difficult to work out what to be doing to further my goal.



As this is rather arduous to play, I've included the following "features" as compensation:

	1.	A 'Reasonably Nice' front end
	2.	Currah Microspeech Compatible
	3.	Some nice music, if you complete the puzzle.
	4.	Very terse instructions. (And verbose Currah Speech instructions).
	5.	The option to give up.  Key [0].  Both from the game, and from the program.
	6.	Various exit errors if you quit (Aiming for the Cyan Challenge - though as it is Currah Microspeech compatible, it's not 128K friendly, so some error codes are impossible)
	7.	High Score Initials, like you're in the arcade.
	8.	FOUR UDGs.
	9.	The odd beep.
	10.	"Jiggly" letters, by poking the system variable for where the font is stored.
	11.	A 'Big Font', defined and executed in BASIC, some characters of which are never used.
	12.	A sort of loading screen (drawn in the BASIC loader)


I hope you 'enjoy' it.

Andy 'uglifruit' Jenkinson
andyuglifruit@hotmail.com
	







