December Third and Fourth
04 Dec 2023 - Daniel Ramirez
Hectic schedule, uint64, and Malt Ale
Day 3
Wins for the day:
- Figured out exactly how I would like to structure
func (m *Model) highlightColumn(colHeader string)
- I will be holding on to a bitboard that describes the current highlighted squares and on each input change this will be updated by ANDing or XORing the bitboard with uint64 bitmasks (i think that’s the term) built via taking two to the power of the indexes that need their values updated
- Had to introduce the short-lived
func intPow(n, m int) int
for this
- Had to introduce the short-lived
- It did not work :)
- In the shower after the second coding session of the day (busy day) it occurred to me it would likely be less expensive to construct a string every time and then parse to binary and cast to uint64
- I will be holding on to a bitboard that describes the current highlighted squares and on each input change this will be updated by ANDing or XORing the bitboard with uint64 bitmasks (i think that’s the term) built via taking two to the power of the indexes that need their values updated
- Pictures
- Initial Board
- Broken Highlight
- Even more broken highlight only changes if another highlight can take it’s place
Notes:
- Still some tough spots from no time blocking
Next:
- Fix highlight system
- Construct highlight bitboard on each input update
- Replace existing tutorial notifications (errors, hints, etc)
- Currently there’s a basic validation system the is shoved right above the input field and does not have enough room to be legible
- Likely popovers?
Day 4
Wins:
- Time blocked from 10pm to 1am :–)
- and i got some Dead Guy Ale during my Monday errands (6/10 would buy again in a pinch)
- Fixed the column highlights, now have basic full column
Notes:
- Was not actually able to keep working past midnight, the tiredness got to me
Next:
- Move specific highlighting based on filtering a combination of all pieces on board and all moves that can be made
- one rune filters to pieces in that column
- ex: e
- two runes filters to possible moves for the piece on the specific square
- ex: e2
- three runes filters to all possible moves for that piece on the specific
- ex: e2e
- fully-specified moves must transition to validation system that is not designed yet
- one rune filters to pieces in that column
- define validation system
- perhaps text box with eye catching board that appears to the left of the board since that as of now the board is right up against the terminal window
- restarting game? and other considerations for menuing
- maybe game starts immediately on entering based on command line args but the user can at anytime restart based on args OR go to interactive game setup menu
- similar to vitetris
- maybe game starts immediately on entering based on command line args but the user can at anytime restart based on args OR go to interactive game setup menu