Berkan🇵🇸 @berkan.dev · Nov 7

I modeled my problem via deeply nested structs. Game -> list of Round -> list of Player -> Hand -> List of Cards To update a player's hand I've had to write lots of deeply cohesive methods in different modules.

0 likes 1 replies

?

Replies

Berkan🇵🇸 · Nov 7

in Ruby this could have been a single method with couple of lines. ```ruby def submit turn round .current_player .hand .cards .reject! {|card| card.selected? } round.current_player.score += score round end ``` Of course this throws out the immutability, which sucks.