Guest User

Untitled

a guest
Jun 3rd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.53 KB | None | 0 0
  1. shouldTakeCard(CardColor) :-
  2.     numberOfCards(CardColor,HowManyIHave),
  3.     numberOfCards(joker,JokerCount),
  4.     roadListToBuild(RoadList),
  5.     member(Edge,RoadList),
  6.     Edge = path(City1,City2,Length,Color,Coordinates,Status),
  7.     (
  8.         (
  9.             Color == gray,
  10.             (
  11.                 Length>4,
  12.                 JokerCount + HowManyIHave >= Length-1
  13.             );
  14.         );
  15.         (
  16.             Color \= gray,
  17.             (
  18.                 Length>4,
  19.                 JokerCount + HowManyIHave >= Length-1
  20.             );
  21.             (
  22.                 Length>3,
  23.                 HowManyIHave >= Length-2
  24.             );
  25.             (
  26.                 Length=<3,
  27.                 HowManyIHave >= Length-1
  28.             )
  29.         )
  30.     ).
Add Comment
Please, Sign In to add comment