Building Games in SC#: Klondike solitaire
9 passed7 failed |
56.3% |
IN1 753 298
OUT36 402 |
| ✓ |
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
28 tool calls |
Passed |
IN1 753 298
OUT36 402 |
| × |
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 callsHiddenTestList index 0 is out of range. The list has 0 element(s). (line 858) |
Failed |
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 callsHiddenTest |
Passed |
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 callsHiddenTestAssertion expression evaluated to false: foundations[2].Count == 2 && Hidden_Same(tableau[4], [Hidden_Card(4, 0), Hidden_Card(3, 2)]) && moves == 1
Context: column 4: 3
Values:
foundations[2].Count = 3
moves = 0 (line 1070) |
Failed |
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: Hidden_Same(foundations[1], [Hidden_Card(1, 1)]) && waste.Count == 1
Context: the Ace of diamonds on foundation 1
Values:
waste.Count = 2 (line 1040) |
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 callsHiddenTest |
Passed |
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 callsHiddenTest |
Passed |
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 callsHiddenTestAssertion expression evaluated to false: deck.Count == 52
Context: deck has 0 cards
Values:
deck.Count = 0 (line 874) |
Failed |
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 callsHiddenTest |
Passed |
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: Hidden_Differ(away, back) >= 64 * 90 * 5 / 10
Context: while dragged the card is not drawn in its column (line 1197) |
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 callsHiddenTestList index 28 is out of range. The list has 0 element(s). (line 892) |
Failed |
IN0
OUT0 |
| ✓ |
Hidden_StripEdgesA press picks the card whose uncovered strip contains the mouse, exactly at the strip edges.0 AI queries
0 tool callsHiddenTest |
Passed |
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 false, moves 0
Values:
won = false
foundations[1].Count = 12
tableau[5].Count = 1
moves = 0 (line 1112) |
Failed |
IN0
OUT0 |