Commit Graph

573 Commits

Author SHA1 Message Date
Jamie McCarthy
5826a0ce82 Tighten up direction-finding logic 2021-03-01 10:08:35 -06:00
Jamie McCarthy
c17ea838d3 Add in the direction-finding logic 2021-03-01 10:06:08 -06:00
Jamie McCarthy
b4254488bd Line-by-line-as-literally-as-possible conversion from BASIC to Ruby
Excluding the direction-finding logic.

Ruby lacks a GOTO or even a way to "break" out of two loops instead of
one, necessitating the use of variables and subroutines that the
original program lacked.
2021-03-01 10:05:56 -06:00
Dave LeCompte
d8d3c0773c Port PIZZA to Python
Refactored logic into functions. If you're the kind of person that likes to say "pizza pie", then you might also like saying "pizza.py".
2021-03-01 08:01:15 -08:00
nanochess
3a1f61737c Ported BLACKJACK to Javascript 2021-03-01 09:54:41 -06:00
Dave LeCompte
773ea76b33 Port LITQUIZ to Python
pulled questions and answers out into a question class to reduce repetition in the logic.
2021-03-01 07:05:13 -08:00
Jamie McCarthy
880fac2e3f Start hurkle.rb with the original BASIC code 2021-03-01 08:56:21 -06:00
Brian Wignall
43bf3788c4 Array access changes 2021-03-01 07:19:02 -05:00
Jack Boyce
9e0b0bbdfe cleanup 2021-03-01 03:06:29 -08:00
Jack Boyce
d8b7a32655 fix bug in starbase layout (bug in BASIC original) 2021-03-01 02:25:46 -08:00
Jack Boyce
e84711d8c3 testing and cleanup 2021-03-01 01:03:46 -08:00
Dave LeCompte
7979e2c8cc Port ORBIT to Python
Pretty straightforward port - a huge portion of the code is drawing ASCII art of Earth.

I also took the liberty of deleting unnecessary work to get the argument to math.cos to lie between -180 and 180 degrees. Maybe that was important back in the day.
2021-02-28 21:33:52 -08:00
Jeff Atwood
787e7a40ff Merge pull request #140 from tsmaster/port-poetry
Port POETRY to Python
2021-02-28 20:48:54 -08:00
Dave LeCompte
af605a80c7 Port POETRY to Python
So much spaghetti in the source BASIC! I've tried to make things more modular, but it's still a complicated machine. There's room for somebody else to refactor this to be cleaner, if they feel like it.
2021-02-28 20:46:23 -08:00
Jeff Atwood
2cd440e49d Merge pull request #139 from journich/main
Java version of Love game
2021-02-28 20:44:42 -08:00
Jeff Atwood
505e9126bd Merge pull request #138 from nanochess/main
Ported BATTLE to Javascript
2021-02-28 20:44:27 -08:00
journich
ee0aa306ee Java version of Love game 2021-03-01 14:58:47 +10:30
nanochess
edd76ea962 Ported BATTLE to Javascript 2021-02-28 22:19:46 -06:00
Jeff Atwood
729214b206 Merge pull request #137 from danielpiron/python-tictactoe2
Python port of Tic-Tac-Toe 2 (first pass)
2021-02-28 19:13:11 -08:00
Jeff Atwood
5e4ef4a136 Merge pull request #136 from iamtraction/main
Hurkle - Python port
2021-02-28 19:11:16 -08:00
Daniel Piron
fb8b8c75cb Python port of Tic-Tac-Toe 2 (first pass)
Needs work on Computer AI
2021-02-28 22:09:10 -05:00
Sankarsan Kampa
1d4b0d24e3 hurkle: add python port
Signed-off-by: Sankarsan Kampa <19631364+iamtraction@users.noreply.github.com>
2021-03-01 08:32:43 +05:30
Jeff Atwood
52d1c17595 Merge pull request #135 from ibrahimalbarghouthi/word
Converted 'Word' to ruby
2021-02-28 18:49:15 -08:00
ibrahim albarghouthi
2ded55c46e Converted 'Word' to ruby 2021-03-01 04:45:51 +02:00
Jeff Atwood
6fb849cc86 Merge pull request #134 from Swofty-Developments/main
63 Name port over to Java
2021-02-28 18:32:25 -08:00
Jeff Atwood
1d3dde74f2 Merge pull request #133 from jkboyce/main
first pass--feature complete, needs testing and cleanup
2021-02-28 18:31:37 -08:00
Swofty
4d4e76b67c Merge pull request #1 from Swofty-Developments/Swofty-Developments-name-java
63 Name ported to Java
2021-03-01 13:30:07 +11:00
Swofty
2ee4e57d67 63 Name ported to Java
Porting over name to Java, should be fully complete.
2021-03-01 13:28:51 +11:00
Jack Boyce
de5b6a68d4 first pass--feature complete, needs testing and cleanup 2021-02-28 18:22:23 -08:00
Jeff Atwood
121090c7f8 Merge pull request #132 from consultutah/main
Port Amazing to C# from Java version
2021-02-28 18:22:19 -08:00
Jeff Atwood
9055bed4fb Merge pull request #131 from anson-vandoren/main
Adds Python implementation for Depth Charge
2021-02-28 18:21:36 -08:00
Jeff Lewis
d902b3ba29 Port Amazing to C# from Java version 2021-02-28 19:00:55 -07:00
Anson VanDoren
d145b2a545 Merge branch 'main' of github.com:anson-vandoren/basic-computer-games into main 2021-02-28 17:42:50 -08:00
Anson VanDoren
7c02b6647a adds Python implementation of 31 - Depth Charge 2021-02-28 17:41:47 -08:00
Jeff Atwood
4cd8038078 Merge pull request #129 from tsmaster/port-nicomachus
Port NICOMACHUS to Python
2021-02-28 16:58:35 -08:00
Dave LeCompte
7841caa577 Port NICOMACHUS to Python
Straightforward port. Uses a modulo operator instead of repeated subtraction, because what am I, a farmer?
2021-02-28 16:44:54 -08:00
Jeff Atwood
b31ed09153 Merge pull request #127 from tsmaster/port-chemist
Port CHEMIST to Python
2021-02-28 16:09:01 -08:00
Jeff Atwood
ea805e3f18 Merge pull request #126 from tsmaster/port-awari
Port AWARI to Python
2021-02-28 16:08:43 -08:00
Jeff Atwood
b61c826023 Merge pull request #125 from olliehcrook/ollies-branch
Added java version of mathdice game
2021-02-28 16:07:52 -08:00
Jeff Atwood
2973745a14 Merge pull request #124 from Boltyk/develop
Port Battle to C#
2021-02-28 16:07:36 -08:00
Jeff Atwood
25df73afff Merge pull request #123 from iamtraction/main
Gunner - Python Port
2021-02-28 16:05:42 -08:00
Jeff Atwood
3ef442333c Merge pull request #114 from clamey/amazing-java
Amazing java
2021-02-28 16:03:49 -08:00
Jeff Atwood
ba982e2547 Merge pull request #128 from tsmaster/port-number
Port NUMBER to Python
2021-02-28 16:02:56 -08:00
Dave LeCompte
3c43eb01ac Port NUMBER to Python
Simple port, changed some variable names.
2021-02-28 15:55:01 -08:00
Marc Heiligers
5cefe561dd BasicArrayTwoD, top row drawn, and trying to logic my way through the next row 2021-02-28 16:47:50 -07:00
Dave LeCompte
82cb0ffff7 Port CHEMIST to Python
Very straightforward port. I noticed a mis-scanned text error in chemist.bas, which I changed to comply both with the original book and correct English spelling. :)
2021-02-28 15:36:30 -08:00
Dave LeCompte
22c791d8d1 Port AWARI to Python
I attempted to do a faithful port of the logic for the most part. In particular, there's a clever base-6 encoding of move history that allows games to be stored as integers in a "losing book" array, which allows the AI to become stronger over time. I did not change this logic, as I felt that the cleverness of this solution is worth observing. I endeavored to make every variable clearer, and use functions to help make program flow easier to understand.

I did make one small change to the logic, which I also documented clearly, having to do with evaluating very large moves. The code, as originally published, looks like a typo to me, but with BASIC, it's hard to be certain.

Also, I'm bad at this game; the computer beats me almost always.
2021-02-28 15:12:47 -08:00
Oliver Hensman-Crook
48b823f42a Added java version of mathdice game 2021-02-28 23:03:30 +00:00
Jeff Atwood
9d46e6badf Merge pull request #121 from coezbek/main
Added conversion of "01 Acey Ducey" to ruby
2021-02-28 14:50:10 -08:00
Jeff Atwood
f5db151a84 Merge pull request #120 from ericfischer/chemist-c
Link to C port
2021-02-28 14:49:34 -08:00