Timeline for A chess engine in Java: generating white pawn moves
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 26 at 18:36 | comment | added | RoToRa | There shouldn't be any danger from an NPE: 1) The developer should be aware of the use of null here 2) Any decent IDE nowadays will warn you. And instead of a "third player", a better solution would have an interface from which both the record Piece and an empty piece/field would inherit. | |
Jun 26 at 15:40 | comment | added | J_H | Modeling with null is certainly one design choice that could work. Another would be to introduce a third player who has only one kind of piece: EMPTY. Now we can’t NPE. | |
Jun 26 at 13:03 | history | edited | toolic | CC BY-SA 4.0 |
added 2 characters in body
|
Jun 26 at 12:53 | history | answered | RoToRa | CC BY-SA 4.0 |