The purpose of this lab is to give you an opportunity to learn the following skills:
For this lab, please do the following activities:
1. If necessary, refactor/redesign your initial solution based on the design principles youve seen in the lectures and labs.
2. Make a plan how you are going to implement undo and redo. Discuss your plan with the lab instructor and make sure that you understand the requirements of the multi-level undo redo features. Being able to design an elegant solution is one of this labs main objectives, so please put significant effort to come up with a good design.
3. Add the multi-level undo and redo features to your FreeCell implementation. Please ask questions if you need clarification.
F0: []
F1: []
F2: []
F3: []
H0: []
H1: []
H2: []
H3: []
T0: [6♦, Q♠, 8♥, 3♠, A♠, 8♠, A♣]
T1: [10♦, J♥, 9♣, 4♣, 8♦, Q♦, J♣]
T2: [4♦, J♠, 5♦, 5♠, 2♠, 9♥, 6♣]
T3: [K♣, 8♣, 4♠, 7♣, K♦, 10♠, A♥]
T4: [Q♣, 6♥, 4♥, 10♥, 7♥, 7♠]
T5: [3♣, K♥, 3♦, 2♥, 10♣, Q♥]
T6: [A♦, 9♦, 5♥, K♠, 7♦, J♦]
T7: [6♠, 2♦, 9♠, 3♥, 2♣, 5♣]
Your move < from to> (0 to exit, U to undo, R to redo): T0 H0
F0: []
F1: []
F2: []
F3: []
H0: [A♣]
H1: []
H2: []
H3: []
T0: [6♦, Q♠, 8♥, 3♠, A♠, 8♠]
T1: [10♦, J♥, 9♣, 4♣, 8♦, Q♦, J♣]
T2: [4♦, J♠, 5♦, 5♠, 2♠, 9♥, 6♣]
T3: [K♣, 8♣, 4♠, 7♣, K♦, 10♠, A♥]
T4: [Q♣, 6♥, 4♥, 10♥, 7♥, 7♠]
T5: [3♣, K♥, 3♦, 2♥, 10♣, Q♥]
T6: [A♦, 9♦, 5♥, K♠, 7♦, J♦]
T7: [6♠, 2♦, 9♠, 3♥, 2♣, 5♣]
Your move < from to> (0 to exit, U to undo, R to redo): T3 H1
F0: []
F1: []
F2: []
F3: []
H0: [A♣]
H1: [A♥]
H2: []
H3: []
T0: [6♦, Q♠, 8♥, 3♠, A♠, 8♠]
T1: [10♦, J♥, 9♣, 4♣, 8♦, Q♦, J♣]
T2: [4♦, J♠, 5♦, 5♠, 2♠, 9♥, 6♣]
T3: [K♣, 8♣, 4♠, 7♣, K♦, 10♠]
T4: [Q♣, 6♥, 4♥, 10♥, 7♥, 7♠]
T5: [3♣, K♥, 3♦, 2♥, 10♣, Q♥]
T6: [A♦, 9♦, 5♥, K♠, 7♦, J♦]
T7: [6♠, 2♦, 9♠, 3♥, 2♣, 5♣]
Your move < from to> (0 to exit, U to undo, R to redo): T0 F0
F0: [8♠]
F1: []
F2: []
F3: []
H0: [A♣]
H1: [A♥]
H2: []
H3: []
T0: [6♦, Q♠, 8♥, 3♠, A♠]
T1: [10♦, J♥, 9♣, 4♣, 8♦, Q♦, J♣]
T2: [4♦, J♠, 5♦, 5♠, 2♠, 9♥, 6♣]
T3: [K♣, 8♣, 4♠, 7♣, K♦, 10♠]
T4: [Q♣, 6♥, 4♥, 10♥, 7♥, 7♠]
T5: [3♣, K♥, 3♦, 2♥, 10♣, Q♥]
T6: [A♦, 9♦, 5♥, K♠, 7♦, J♦]
T7: [6♠, 2♦, 9♠, 3♥, 2♣, 5♣]
Your move < from to> (0 to exit, U to undo, R to redo): U
F0: []
F1: []
F2: []
F3: []
H0: [A♣]
H1: [A♥]
H2: []
H3: []
T0: [6♦, Q♠, 8♥, 3♠, A♠, 8♠]
T1: [10♦, J♥, 9♣, 4♣, 8♦, Q♦, J♣]
T2: [4♦, J♠, 5♦, 5♠, 2♠, 9♥, 6♣]
T3: [K♣, 8♣, 4♠, 7♣, K♦, 10♠]
T4: [Q♣, 6♥, 4♥, 10♥, 7♥, 7♠]
T5: [3♣, K♥, 3♦, 2♥, 10♣, Q♥]
T6: [A♦, 9♦, 5♥, K♠, 7♦, J♦]
T7: [6♠, 2♦, 9♠, 3♥, 2♣, 5♣]
Your move < from to> (0 to exit, U to undo, R to redo): U
F0: []
F1: []
F2: []
F3: []
H0: [A♣]
H1: []
H2: []
H3: []
T0: [6♦, Q♠, 8♥, 3♠, A♠, 8♠]
T1: [10♦, J♥, 9♣, 4♣, 8♦, Q♦, J♣]
T2: [4♦, J♠, 5♦, 5♠, 2♠, 9♥, 6♣]
T3: [K♣, 8♣, 4♠, 7♣, K♦, 10♠, A♥]
T4: [Q♣, 6♥, 4♥, 10♥, 7♥, 7♠]
T5: [3♣, K♥, 3♦, 2♥, 10♣, Q♥]
T6: [A♦, 9♦, 5♥, K♠, 7♦, J♦]
T7: [6♠, 2♦, 9♠, 3♥, 2♣, 5♣]
Your move < from to> (0 to exit, U to undo, R to redo): R
F0: []
F1: []
F2: []
F3: []
H0: [A♣]
H1: [A♥]
H2: []
H3: []
T0: [6♦, Q♠, 8♥, 3♠, A♠, 8♠]
T1: [10♦, J♥, 9♣, 4♣, 8♦, Q♦, J♣]
T2: [4♦, J♠, 5♦, 5♠, 2♠, 9♥, 6♣]
T3: [K♣, 8♣, 4♠, 7♣, K♦, 10♠]
T4: [Q♣, 6♥, 4♥, 10♥, 7♥, 7♠]
T5: [3♣, K♥, 3♦, 2♥, 10♣, Q♥]
T6: [A♦, 9♦, 5♥, K♠, 7♦, J♦]
T7: [6♠, 2♦, 9♠, 3♥, 2♣, 5♣]
Your move < from to> (0 to exit, U to undo, R to redo): R
F0: [8♠]
F1: []
F2: []
F3: []
H0: [A♣]
H1: [A♥]
H2: []
H3: []
T0: [6♦, Q♠, 8♥, 3♠, A♠]
T1: [10♦, J♥, 9♣, 4♣, 8♦, Q♦, J♣]
T2: [4♦, J♠, 5♦, 5♠, 2♠, 9♥, 6♣]
T3: [K♣, 8♣, 4♠, 7♣, K♦, 10♠]
T4: [Q♣, 6♥, 4♥, 10♥, 7♥, 7♠]
T5: [3♣, K♥, 3♦, 2♥, 10♣, Q♥]
T6: [A♦, 9♦, 5♥, K♠, 7♦, J♦]
T7: [6♠, 2♦, 9♠, 3♥, 2♣, 5♣]
Your move < from to> (0 to exit, U to undo, R to redo): R
Nothing to redo.
Your move < from to> (0 to exit, U to undo, R to redo):