-------------------------------------------------------------------------------- Luffar v2.0 Documentation -------------------------------------------------------------------------------- _ _ _ ________ __ ___ | | | | | | __/ __// _| __\ The game of noughts and crosses. | |_| |_| | /| // | | by Magnus Enarsson. !___!\___/!_! !_!/_/!_!_!\_\ v2.0 Made in SWEDEN. Please select from the following topics: 'Copyright and Disclaimer ' 'Requirements and Installation ' s 'About the playing routine ' m 'The game of noughts and crosses' K i ! 'Luffar Menus ' e l 'Luffar Window ' e i ':-)' 'Luffar Tooltypes ' p n g 'Wisdom ' 'Credits ' -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- The computer player is based on a algorithm made by 'Magnus' Enarsson (me). The routine is very optimized to be fast, but it doesn't play that well. I have some ideas of how to make it very hard to beat but I keep them to further releases (if any). Still Luffar is good enough to entertain most people. Mail me and let me know what YOU think. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Luffar v2.0 Copyright 1993,1994 by 'Magnus' Enarsson. All rights reserved. Completely rewritten update to Luffar v1.0 on Fish #863. Luffar is FREEWARE so no financial donations are required (but welcome). You may NOT change the program or documentation in any way. Luffar may NOT be included in any commercial product or magazine coverdisk without my written permission. Keep the program and documentation together while spreading it. Luffar is well tested and safe to use, but I take no responsibility what so ever for any damage caused by the use or misuse of the program and/or this documentation. If you have any suggestions, complaints or bugreports so please feel free to write me. I love mail (email). :-) 'Magnus' Enarsson Laxviken 3134 830 60 Föllinge SWEDEN d3enar@dtek.chalmers.se -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- You must have version 2.04 or better of the Amiga operating system to run Luffar 2.0. If you try anyway you will be told once more. Luffar 1.0 on Fred Fish disk #863 will run with older versions of the operating system. But keep in mind that Luffar 2.0 is more than twice as good. :-) To install Luffar on a hard disk drive, just drag the icon. It's all there in one file. If you want to start Luffar 2.0 from CLI it will work just fine but you lose the power of 'tooltypes' and will be running with the defaults. If you open Luffar on a hires/interlaced screen it will rescale so it remains square. To override that set the tooltype 'INTERLACE_SCALE' to 'FALSE'. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Noughts and crosses is easy to learn and the rules are simple, but it is still hard to become a good player. There are two players where one has the x-symbol and the other has the o-symbol. The players place their symbols every other time in a empty box. The board contains 15*15 boxes and the x-symbol will always begin in the middle box. To win you must place five of your symbols in an unbroken row vertically, horizontally or diagonally. There are two special rules that are optional: o Only win on five (Default). This rule means that the winning line should be exactly five of one kind. Six in a row counts as nothing. o Russian opening (Default) This is a rule to decrease the benefit of beginning. It means that the second cross must have two boxes between itself and the beginning cross in the middle. These two options can be set in the 'settings menu'. The name Luffar origins from the Swedish name "Luffarschack" which means "Chess for the vagabonds". -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- The menubar menus. ' Project ' ' Settings ' | About... | | V Auto restart? A| |==========| | V Russian opening? R| | Quit Q| | V Only win on five? F| +----------+ +-----------------------+ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o About... Brings up a requester that tells about me and the program. The Luffar window will sleep when the About window is open. No action can be done until the About window is gone. o Quit Shortcut: Q Quits the program without asking. You can also use the close gadget in the upper left corner of the 'Luffar window'. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o Auto restart Shortcut: R. Default checked. Toggles the auto restart option. If checked you can restart the game by clicking in the 'board' when the game is over. The computer player isn't affected other than in one player mode when the computer player will toggle to play the other symbols. Just try it and you will understand ('Martin Rebas' didn't). o Russian opening Shortcut: O. Default checked. If checked the computer will play with russian opening. You may still play with or without russian opening. Russian opening is a rule to decrease the benefit of beginning. It means that the second cross must have two boxes between itself and the first cross in the middle. If you don't understand this, just observe the computer playing. o Only win on five Shortcut: F. Default checked. If checked only five in a row will be counted as a winning row. Six in a row will be ignored. Luffar will restart the game when selected to avoid forbidden states. The defaults can be changed with 'Luffar ToolTypes'. See also the 'rules of noughts and crosses'. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Close gadget Zip (zoom) gadget--+ Depth gadget | | | | ___________________________________________V__ | +--->|o| Luffar by 'Magnus' Enarsson |o|o|<-----+ +------------------------------------------+-+-| | +-----------------------+ Luffar v2.0 | | | | | | | | ' Restart ' | | | | ' << '' >> ' | | | | --------- | | | 'Board' | Computerplayer | | | | '| | Play crosses' | | | | '| | Play rings ' | | | | | | | | '@| Level ' | | | | '@| Style ' | | +-----------------------+ | +----------------------------------------------+ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o Restart button Rewinds to the beginning but remembers the moves done so you can use the 'Ahead button' to step through the game. It will also turn off the computer players. See also autorestart in the 'settings menu'. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o Rewind button ( << ) Will rewind one move if possible. Good to use when you get angry because the computer beats you. :-) -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o Ahead button ( >> ) Will wind ahead one move if possible. Can be used after a restart. If anyone set a new move the ahead button will be ghosted. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o Play crosses button Select this to make the computer play crosses. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o Play rings button Select this to make the computer play rings. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o Level cycle button When you press this you will cycle the level. The level is how good the computer plays. It will think longer at the higher levels. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o Style cycle button If you press this button you will toggle how offensively the computer plays. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o The board contains 15x15 boxes. The symbols are put in the boxes. The board is also the place you press to use the autorestart option in the 'settings menu'. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Here are a list of Luffar ToolTypes. Remember to use uppercase letters. If it doesn't work, check the spelling. If you have general thoughts about ToolTypes, consult your Workbench manual. 'AUTO_RESTART ' 'RUSSIAN_OPENING ' 'ONLY_WIN_ON_FIVE' 'LEVEL ' 'STYLE ' 'PUBSCREEN ' 'INTERLACE_SCALE ' 'LEFTEDGE ' 'TOPEDGE ' 'ZIP_WINDOW ' 'SMALLEFTEDGE ' 'SMALLTOPEDGE ' -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o AUTO_RESTART Syntax: AUTO_RESTART=TRUE | FALSE Default: AUTO_RESTART=TRUE Sets the default in the 'settings menu.' -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o RUSSIAN_OPENING Syntax: RUSSIAN_OPENING=TRUE | FALSE Default: RUSSIAN_OPENING=TRUE Sets the default in the 'settings menu.' -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o ONLY_WIN_ON_FIVE Syntax: ONLY_WIN_ON_FIVE=TRUE | FALSE Default: ONLY_WIN_ON_FIVE=TRUE Sets the default in the 'settings menu.' -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o LEVEL Syntax: LEVEL=HALF_BLIND | DUMB | BAD | GOOD | JOLLY_GOOD Default: LEVEL=GOOD Set the default on the 'level button' gadget. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o STYLE Syntax: STYLE=OFFENSIVE | DEFENSIVE Default: STYLE=OFFENSIVE Set the default on the 'style button' gadget. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o PUBSCREEN Syntax: PUBSCREEN= Default: Default public screen. If you want Luffar to open on an other public screen. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o INTERLACE_SCALE Syntax: INTERLACE_SCALE=TRUE | FALSE Default: Depending on resulotion. If you are using a hires/interlaced screen Luffar will scale in order to become square. If you don't like it you can override it with the INTERLACE_SCALE tooltype. If the Luffar window gets bigger than the current screen it will tell you and start with INTERLACE_SCALE disabled. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o LEFTEDGE Syntax: LEFTEDGE= Default: LEFTEDGE=50 Set this to the number of pixels from the left edge of the screen to the Luffar window that you want when Luffar open its window. If the is too big, Luffar will adjust to fit. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o TOPEDGE Syntax: TOPEDGE= Default: TOPEDGE=10 Set this to the number of pixels from the top of the screen to the Luffar window that you want when Luffar open its window. If the is too big, Luffar will adjust so it fits. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o ZIP_WINDOW Syntax: ZIP_WINDOW=TRUE | FALSE Default: ZIP_WINDOW=FALSE The zip (zoom) gadget in the upper right corner of the 'Luffar window' will toggle the size of the window between full size and bar size (small). If you enable ZIP_WINDOW Luffar will zip to small size when started. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o SMALLEFTEDGE Syntax: SMALLEFTEDGE= Default: SMALLEFTEDGE=50 Set this to the number of pixels from the left edge of the screen to the 'zipped' Luffar window that you want. If the is too big, Luffar will adjust to fit. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o SMALLTOPEDGE Syntax: SMALLTOPEDGE= Default: SMALLTOPEDGE=10 Set this to the number of pixels from the top of the screen to the 'zipped' Luffar window that you want. If the is too big, Luffar will adjust so it fits. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o Jag har så mycket nyckelpigor i fickan att jag knappt kan bärga mig! - 'Martin Rebas' o Einstein argued that there must be simplified explanations of nature, because God is not capricious or arbitrary. No such faith comforts the software engineer. - Fred Brooks, Jr. o I believe that part of what propels science is the thirst for wonder. It's a very powerful emotion. All children feel it. In a first grade classroom everybody feels it; in a twelfth grade classroom almost nobody feels it, or at least acknowledges it. Something happens between first and twelfth grade, and it's not just puberty. Not only do the schools and the media not teach much skepticism, there is also little encouragement of this stirring sense of wonder. Science and pseudoscience both arouse that feeling. Poor popularizations of science establish an ecological niche for pseudoscience. - Carl Sagan, The Burden Of Skepticism, The Skeptical Inquirer, Vol. 12, Fall 1987 o This planet has -- or rather had -- a problem, which was this: most of the people living on it were unhappy for pretty much of the time. Many solutions were suggested for this problem, but most of these were largely concerned with the movements of small green pieces of paper, which is odd because on the whole it wasn't the small green pieces of paper that were unhappy. - Douglas Adams o To be or not to be - Shakespeare o To be is to do - Sartre o To do is to be - Nietzsche o Do be do be do - Sinatra o To be, or what? - Sylvester Stallone o You can observe a lot just by watching. - Yogi Berra (sic!) o You see but you do not observe. - Sir Arthur Conan Doyle, in "The Memoirs of Sherlock Holmes" o Albert Einstein, when asked to describe radio, replied: "You see, wire telegraph is a kind of a very, very long cat. You pull his tail in New York and his head is meowing in Los Angeles. Do you understand this? And radio operates exactly the same way: you send signals here, they receive them there. The only difference is that there is no cat." o All I ask is a chance to prove that money can't make me happy. o Politicians should read science fiction, not westerns and detective stories. - Arthur C. Clarke o Det sägs att allt är relativt men det beror väl på vad man jämför med. - 'Martin Rebas' o I hate guns. - MacGyver -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- There are some people that I want to thank: o Christian König - Germany o Andreas Scherer - Germany o Bert Vortman - The Netherlands o Bells - The Netherlands For sending me postcards to make me glad in return when I released Luffar v1.0. =-) o 'Magnus' Johansson o Richard Olsson o Urban Nilsson o Kristoffer Johansson o Jens Wall o 'Martin Rebas' (sic! Oh no! Shake shake, POP!) o Löfvet For inspiration and ideas and ß-testing. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- o Magnus Latin, The big one. Famous examples: Magnus Ladulås King. Magnus Härenstam Popular comedian. Magnus Uggla Good singer. 'Magnus Enarsson' Famous programmer and a nice guy. Also the artist of Icons on Fred Fish disk #972. (Aminet:pix/icon/Icons.lha) Get it and smile. :-) Common name in Sweden. A very common name to me. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Martin Rebas is the author of the games Motorola Invaders and Motorola Invaders II (AGA!). (Aminet:game/shoot/) Try them or regret it for the rest of your life. ____ / \ TM | @ @ | _|______|_ \____/ ___||___ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- :-) If you don't understand this then turn your head or monitor.