Timeline for Tower of Hanoi solver
Current License: CC BY-SA 3.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 12, 2014 at 11:12 | comment | added | rolfl |
Yes, there is. In order to create an EnumMap, you need to supply it with an Enum class Tower.class . The Tower.class is not fully initialized when the enum members A , B , and C are constructed, and thus the code will fail to create the EnumMap if you put the code in the A constructor, etc.
|
|
Feb 12, 2014 at 6:39 | comment | added | JavaDeveloper | @rolfl was there any reason you chose static block in enum over constructor ? thanks | |
Feb 11, 2014 at 20:48 | vote | accept | JavaDeveloper | ||
S Feb 11, 2014 at 2:00 | history | suggested | h.j.k. | CC BY-SA 3.0 |
added void return type for setupTransfers.
|
Feb 11, 2014 at 1:48 | review | Suggested edits | |||
S Feb 11, 2014 at 2:00 | |||||
Feb 10, 2014 at 11:20 | history | edited | rolfl | CC BY-SA 3.0 |
incorporate suggestion from h.j.k. and made static initializer method-based.
|
Feb 9, 2014 at 18:19 | comment | added | Anirban Nag 'tintinmj' | Ok got it. Confusing yet interesting! :D | |
Feb 9, 2014 at 17:56 | history | edited | rolfl | CC BY-SA 3.0 |
add some details on what the static block does.
|
Feb 9, 2014 at 17:53 | comment | added | rolfl |
@tintinmj - I am making a data structure in each tower that allows the method public Transfer getMove(Tower destination) to work. - it should have comments. Will fix
|
|
S Feb 9, 2014 at 17:21 | history | suggested | Anirban Nag 'tintinmj' | CC BY-SA 3.0 |
some formatting and a small spell check.
|
Feb 9, 2014 at 17:06 | review | Suggested edits | |||
S Feb 9, 2014 at 17:21 | |||||
Feb 9, 2014 at 17:04 | comment | added | Anirban Nag 'tintinmj' |
What are you doing in static block of Tower enum, I couldn't understand. Specially why are you doing?
|
|
Feb 9, 2014 at 14:55 | history | answered | rolfl | CC BY-SA 3.0 |