4366
TI-BASIC / Re: [CHALLENGE]Logic and Optimization
« on: January 21, 2011, 09:05:34 pm »
It's fun! I think I can optimise my TTT game a little more though...
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to. 4366
TI-BASIC / Re: [CHALLENGE]Logic and Optimization« on: January 21, 2011, 09:05:34 pm »
It's fun! I think I can optimise my TTT game a little more though...
4367
TI-BASIC / Re: [CHALLENGE]Logic and Optimization« on: January 21, 2011, 08:54:19 pm »
Wow. 14 bytes saved. That is awesome! I've almost never used the DeltaList thing and the int(3rand thing is just... wow. Nice.
4368
TI-BASIC / Re: [CHALLENGE]Logic and Optimization« on: January 21, 2011, 08:27:54 pm »
My first "major" BASIC program was a source for tic-tac-toe my brother found on the internet. It was just two people could play on the calc. I later made my version which was about half the size and had AI and 2 player. But I still appreciate that first program because it exposed me to all sorts of new commands (I had no idea what getKey did or that it existed as well as Goto or Lbl or Text( or a bajillion others).
4369
TI-BASIC / Re: [CHALLENGE]Logic and Optimization« on: January 21, 2011, 08:13:31 pm »
I wanted to challenge people to make one, but I wanted to keep the same graphics and stuff, so I just posted it instead But... I don't know if I should do this... Okee, I will! How about I pose this challenge. Make a Tic-Tac-Toe game that has user input, win/lose/tie detection and has AI that is more than a random number generator. Try to post the smallest version (I have a few that I liked giving out to friends at school. The calc usually won). Oh, and make it so that the user can choose if they are X versus Calc,O versus Calc, or if it is two player (X versus O).
4370
TI Z80 / Re: A present at any price« on: January 21, 2011, 07:39:35 pm »
Oh, that is really cool! Nice! This is one of those inspirations for me to learn french...
4371
BatLib / Re: SpriteLib« on: January 21, 2011, 07:28:11 pm »
If you have ever used xLIB or Celtic3 or something they all use something called a parser hook. This means that some BASIC commands get intercepted by the APP and the APP uses the arguments. BatLib happens to modify sum(. on that note, sum( is usually used to find the sum of a list. For example:
Code: [Select] sum({0,1,4,9,16,,25,36...9801 Would return 328350 (I think ). BatLib lets this normal execution occur, so any BASIC programs that use sum( the normal way will still work.
4372
TI-BASIC / Re: [CHALLENGE]Logic and Optimization« on: January 21, 2011, 05:02:16 pm »
Crap! I must hurry up and add some unoptimisations!
4373
Miscellaneous / Re: What is your avatar?« on: January 21, 2011, 03:57:24 pm »
Erm, so if I take 15-13 I get 2... is that what you mean? Also, there is an equation to the Fibonacci sequence... It inspired me to make one for pythagorean triples I made them so that with one, given "a" it found a working "b" value and the other found the "c" value. That was not boredom
4374
TI-BASIC / Re: [CHALLENGE]Logic and Optimization« on: January 21, 2011, 02:04:43 pm »
It doesn't change A to my knowledge; It only changes B which determines the location of the cursor. It needs A to stay intact because pressing enter returns 105 which exits the loop.
4375
TI Z80 / Re: [Project]Assemblex« on: January 21, 2011, 12:18:05 pm »
Gah, sorry, I cannot see the video I need to install Adobe Flash Player, but it won't install.
4376
TI-BASIC / Re: [CHALLENGE]Logic and Optimization« on: January 21, 2011, 11:25:54 am »
You need A later in the loop, so it won't work
EDIT: Never mind You put A>3 instead of Ans I didn't catch that immediately... Nice! 2 bytes saved REEDIT: Nevermind, you DO need A to complete the Repeat A=105 loop. 4377
TI-BASIC / Re: [CHALLENGE]Logic and Optimization« on: January 21, 2011, 07:56:31 am »
Ah, well, it slows it down slightly from what I can tell (I could be wrong), but it isn't by much.
4378
TI-BASIC / Re: [CHALLENGE]Logic and Optimization« on: January 21, 2011, 12:18:09 am »
Oh, I noticed that the offset in the string was 1 for Rock, 5 for Paper and 10 for Scissors. {1,5,10} happens to be the first 3 numbers in the 5th row of Pascals Triangle. I think nCr is n!/((n-r)!r!) so plug in 5 nCr 1 would be 5!/(4!1!)=120/24=5.
4379
Humour and Jokes / Re: An evil program« on: January 20, 2011, 11:31:37 pm »
'Tis, 'tis. I'm using the link to the picture to show the true powers of these calculators, is that okay?
4380
TI-BASIC / Re: [CHALLENGE]Logic and Optimization« on: January 20, 2011, 11:28:38 pm »
Merging lines and using ":" does not save any bytes of memory and slows the code down a little, so I avoid using the semicolon as a line break.
Didja like my math with the string? |
|