Building Games in SC#: Klondike solitaire
8 passed8 failed |
50.0% |
IN3 466 651
OUT30 320 |
| ✓ |
SolitaireThe model builds a mouse-driven Klondike solitaire like the classic Windows game from the task as an agent; this item passes when the app compiles and can be exported, and each hidden test is its own item.1 AI query
49 tool calls |
Passed |
IN3 466 651
OUT30 320 |
| ✓ |
Hidden_DealDeal() lays out the deck in the exact order: columns 0 to 6 with 1 to 7 cards, only top cards face up, the rest in the stock with deck[28] on top.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| × |
Hidden_DragARunA press on the uncovered strip of a covered card drags it with all cards above it; a press on the top card drags only that card.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: Hidden_Same(tableau[2], [Hidden_Card(3, 3), Hidden_Card(12, 1)]) && hiddenCount[2] == 1
Context: column 2: 41 24 33 , face down 2
Values:
hiddenCount[2] = 2 (line 995) |
Failed |
IN0
OUT0 |
| ✓ |
Hidden_DragOntoAColumnDragging a card onto a card one rank higher of the other color moves it; the uncovered face-down card turns face up.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| ✓ |
Hidden_EnterStartsANewGameEnter starts a new game at any time; a mouse press in that frame does nothing, and a drag in progress is dropped.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| ✓ |
Hidden_FoundationCardBackThe top card of a foundation can be dragged back onto a column when the column rule allows it.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| × |
Hidden_FoundationsFoundations take one card of their own suit in rank order from the Ace; other drops go back.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: waste.Count == 2 && foundations[0].Count == 0
Context: a wrong suit goes back
Values:
waste.Count = 1
foundations[0].Count = 1 (line 1052) |
Failed |
IN0
OUT0 |
| × |
Hidden_IllegalDropsGoBackIllegal drops and drops outside every pile put the cards back and are not moves; only the mouse point decides the target.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: tableau[3].Count == 3 && hiddenCount[3] == 2 && tableau[0].Count == 1
Context: a face-down card is not dragged
Values:
tableau[3].Count = 3
hiddenCount[3] = 1
tableau[0].Count = 1 (line 972) |
Failed |
IN0
OUT0 |
| × |
Hidden_KingOnAnEmptyColumnOnly a King, alone or with the cards above it, can be dropped on an empty column.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: Hidden_Same(tableau[0], [Hidden_Card(2, 2)]) && hiddenCount[0] == 0
Context: the 2 is turned face up
Values:
hiddenCount[0] = 1 (line 1036) |
Failed |
IN0
OUT0 |
| ✓ |
Hidden_NewGameDealsAllCardsA new game (AppInit) deals all 52 different cards: 28 in the columns as Deal() does and 24 in the stock.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| × |
Hidden_RightClickA right click sends the waste top card or a column's top card to its foundation when legal; otherwise nothing happens.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: foundations[3].Count == 0 && tableau[0].Count == 2 && moves == 0
Context: the 2 of spades cannot go yet
Values:
foundations[3].Count = 1
tableau[0].Count = 2
moves = 1 (line 1097) |
Failed |
IN0
OUT0 |
| × |
Hidden_ScreenDragFollowsTheMouseWhile dragging, the dragged card is drawn under the mouse at the pressed offset; after the drop the table looks as before.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: changed >= 64 * 90 * 8 / 10
Context: the dragged card covers its place under the mouse: 0 of 5760 pixels changed
Values:
changed = 0 (line 1201) |
Failed |
IN0
OUT0 |
| ✓ |
Hidden_ScreenShowsCardsFace-up cards, face-down cards and the empty table look different.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| ✓ |
Hidden_StockAndWasteA click on the stock turns its top card to the waste; on the empty stock it turns the whole waste back in order; each is a move.0 AI queries
0 tool callsHiddenTest |
Passed |
IN0
OUT0 |
| × |
Hidden_StripEdgesA press picks the card whose uncovered strip contains the mouse, exactly at the strip edges.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: tableau[1].Count == 7 && tableau[3].Count == 1
Context: the King was pressed and went back
Values:
tableau[1].Count = 9
tableau[3].Count = 1 (line 1013) |
Failed |
IN0
OUT0 |
| × |
Hidden_WinningThe last card on the foundations wins: won is true, "YOU WIN" is shown and the mouse does nothing more.0 AI queries
0 tool callsHiddenTestAssertion expression evaluated to false: won && foundations[1].Count == 13 && tableau[5].Count == 0 && moves == 1
Context: won true, moves 2
Values:
foundations[1].Count = 13
tableau[5].Count = 0
moves = 2
won = true (line 1126) |
Failed |
IN0
OUT0 |