-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elvis #6
base: master
Are you sure you want to change the base?
Elvis #6
Conversation
TicTacToe/App.fs
Outdated
|
||
match anyMoreMoves model with | ||
| true -> StillPlaying | ||
| false -> Draw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just if..else?
TicTacToe/App.fs
Outdated
/// A helper to get the suffix used in the Xaml for a position on the board. | ||
let uiText (row,col) = | ||
(match row with 0 -> "T" | 1 -> "M" | 2 -> "B" | _ -> failwith "huh?") + | ||
(match col with 0 -> "L" | 1 -> "C" | 2 -> "R" | _ -> failwith "huh?") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's pity we loose safety here :( Yes, it's boiler-free, but...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, will adjust
TicTacToe/App.fs
Outdated
| Empty -> | ||
match getGameResult model with | ||
| StillPlaying -> true | ||
| _ -> false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getGameResult model = StillPlaying?
@vasily-kirichenko Thanks for the feedback! I pushed some further updates |
The changes read much better... but what is an "Elvis" F# programmer? |
This is the additional changes including the more basic cleanup #5 to make the UI more programmatic in the way that an "Elvis" F# programmer would do it. I think the code in master is right for beginners. Then show this transition.