Jeff Atwood
e513b77ac5
Merge pull request #731 from jnellis/main
...
Fixes to python version of Mastermind
2022-05-01 10:20:35 -07:00
Joe Nellis
350ea1dda5
Merge remote-tracking branch 'origin/main'
2022-04-30 01:38:18 -07:00
Joseph Nellis
d431dce0ab
Merge branch 'coding-horror:main' into main
2022-04-30 01:37:40 -07:00
Joe Nellis
dcf816f00e
Merge remote-tracking branch 'origin/main'
...
# Conflicts:
# 60_Mastermind/python/mastermind.py
2022-04-30 01:33:41 -07:00
Joe Nellis
84fce13f35
Refactoring player turn and computer turn to separate methods. Computer turn logic previously ignored counting turns. Computer turn previously gave up the round if the user enters "inconsistent information" about the computers guess when it should have restarted the computers turn. Refactoring to remove usage of 'flag' variables to control program flow.
2022-04-30 01:31:59 -07:00
Joe Nellis
f74367fa59
Refactoring player turn and computer turn to separate methods. Computer turn logic previously ignored counting turns. Computer turn previously gave up the round if the user enters "inconsistent information" about the computers guess when it should have restarted the computers turn. Refactoring to remove usage of 'flag' variables to control program flow.
2022-04-30 00:42:24 -07:00
Joe Nellis
8bc2b33a58
Refactoring to distinguish setup of the game from the actual game. Changing globals to uppercase to signal constancy while assigning them via return from #setup_game. The two remaining mutable globals are for score keeping. Maintain commenting style of multistring inside method body.
2022-04-29 22:20:22 -07:00
Joe Nellis
cca3f941d2
More cleanup refactoring, losing unused variables, shadowed globals, unnecessary spaces, and long lines, and debug prints.
2022-04-29 17:34:31 -07:00
Joe Nellis
4308713ec2
Refactoring of the #get_possibility and #make_human_readable methods into one method, #possibility_to_color_code, that just converts a solution permutation (out of the possible permutations) straight into a string code of letters.
...
Both of these methods are essentially a flow of the first method being fed into the second and thus they are combined and the intermediate data structure (List[int]) is no longer needed.
2022-04-29 17:10:10 -07:00
Joe Nellis
44983bb25f
More off by 1 errors of the same type as the previous commit for the computer guessing the secret code. All errors are involved in the algortihm that converts an empty list to a guess.
2022-04-29 13:54:53 -07:00
Jeff Atwood
806ce22d53
add porting notes about potential bug
2022-04-28 11:40:32 -07:00
Joe Nellis
bacad32a61
Off by one error in for/range. Previously if the computer chose a secret code of zero (all blacks) it would skip initialization entirely and the player would not be able to finish the puzzle. Alternatively, if the computer chose the highest secret code (e.g. all Red in a three color puzzle), the actual secret code would be initialized to one less (RRW).
2022-04-24 17:39:03 -07:00
Jeff Atwood
9ce5c9bb23
Merge pull request #728 from AnthonyMichaelTDM/rust-port-32_Diamond
...
Rust port 32_diamond
2022-04-22 15:13:37 -07:00
AnthonyMichaelTDM
69e9c1438e
bit of modification to match description of readme
2022-04-22 13:27:06 -07:00
AnthonyMichaelTDM
733513c156
finished 32_diamond
2022-04-22 13:02:52 -07:00
Jeff Atwood
3ace319d9d
Merge pull request #726 from AnthonyMichaelTDM/rust-port-18_bullseye
...
rust port of 18_blackjack
2022-04-18 14:22:12 -07:00
Jeff Atwood
86913e57da
Merge pull request #727 from coding-horror/python-hockey
...
Hockey (Python): Implemented
2022-04-18 14:21:06 -07:00
Martin Thoma
0d5fffefe6
Remove code duplication
2022-04-18 22:34:23 +02:00
AnthonyMichaelTDM
f8fa6fec78
still not working hmmm
2022-04-18 13:28:25 -07:00
Martin Thoma
123e13f171
Random hint
2022-04-18 22:27:28 +02:00
Martin Thoma
423f2718f1
Hockey (Python): Implemented
2022-04-18 22:25:38 +02:00
AnthonyMichaelTDM
bfbc4b743f
progress on 32_diamond
...
next step: inset newline character every LINE_WIDTH characters
2022-04-18 13:24:41 -07:00
AnthonyMichaelTDM
47dd843f40
18_blackjack done
2022-04-18 12:16:27 -07:00
AnthonyMichaelTDM
75c63ff17d
32_diamond
2022-04-18 12:13:06 -07:00
Jeff Atwood
1eb0c46868
Merge pull request #724 from drewjcooper/csharp-13-bounce
...
C# 13 bounce
2022-04-18 11:40:12 -07:00
Jeff Atwood
2aafc0f85f
Merge pull request #725 from coding-horror/todo-script
...
ENH: Link games
2022-04-18 11:39:02 -07:00
Martin Thoma
269815bd2e
ENH: Link games
...
Also show progress summary for the different languages
2022-04-17 18:37:50 +02:00
Martin Thoma
b975ac94a9
MAINT: Update TODO.md
2022-04-17 18:25:37 +02:00
Andrew Cooper
89dba2e3f8
Add conversion notes to Readme
2022-04-17 19:47:43 +10:00
Andrew Cooper
ab48a16f7f
Add some comments and game loop
2022-04-17 19:47:22 +10:00
Andrew Cooper
c9cd477022
Encapsulate calculations and graph logic
2022-04-17 19:33:02 +10:00
Jeff Atwood
70b2c92556
Merge pull request #723 from drewjcooper/csharp-25-chief
...
C# 25 chief
2022-04-16 13:22:15 -07:00
Andrew Cooper
e2599bc38b
Intiial implementation
2022-04-16 22:34:35 +10:00
Andrew Cooper
c4c67e15a2
Add resources
2022-04-16 22:34:08 +10:00
Andrew Cooper
8dd1180d87
Correct formatting of numbers in output
2022-04-16 17:24:32 +10:00
Andrew Cooper
5fbf0dc37f
Encapsulate formulae
2022-04-16 17:00:06 +10:00
Jeff Atwood
ba06a03ef8
Merge pull request #722 from drewjcooper/csharp-07-basketball
...
C# 07 basketball
2022-04-15 09:15:47 -07:00
Andrew Cooper
6927c5ad14
Add game logic
2022-04-15 22:48:59 +10:00
Andrew Cooper
25dc10bf3f
Add resources
2022-04-15 22:17:33 +10:00
Andrew Cooper
229084c492
Add game class
2022-04-15 21:43:24 +10:00
Andrew Cooper
01492a697f
Enable nullable ref types in common library
2022-04-15 21:30:16 +10:00
Andrew Cooper
b2f987c059
Merge branch 'coding-horror:main' into csharp-07-basketball
2022-04-15 21:01:02 +10:00
Jeff Atwood
15271037a3
Merge pull request #718 from jnellis/main
...
Bagels in Lua.
2022-04-13 21:59:09 -07:00
Jeff Atwood
d26a57278d
Merge pull request #717 from Jay-0331/main
...
Rust Translation for Dice
2022-04-13 21:54:19 -07:00
Jeff Atwood
f3e778b40b
Merge pull request #719 from coding-horror/700-terminal-fixes
...
fix terminal emulator on mobile
2022-04-13 21:51:01 -07:00
Jeff Atwood
4241caf054
Merge pull request #720 from coding-horror/707-reduce-css-cpu-usage
...
removed css animation for performance
2022-04-13 21:50:37 -07:00
Alexander Wunschik
4d4aea42fc
fix( #707 ): removed css animation for performance
2022-04-13 22:59:20 +02:00
Alexander Wunschik
1f02b11c74
fix( #700 ): fix terminal emulator on mobile
2022-04-13 22:16:46 +02:00
Joe Nellis
882117758d
Bagels in Lua.
2022-04-13 02:57:15 -07:00
jay-0331
d0c46689e1
Removed All HTML in Rust Folder
2022-04-13 14:21:35 +05:30