0
votes

Hi i am trying to make a Prolog program in which a user answers some question and I find the right game for him! I want to make a point system where i keep the name and the points for each game when the answer suite with the characteristics of the game

for example :

sims3 :-
    simulationGame,
    rolePlayingGame.
dragonAgeII :-
    rolePlayingGame.

rolePlayingGamev :-
    test(do_you_like_play_games_with_structured_decision_and_chars_development).
simulationGame :-
    test(do_you_like_simulation_games).

but in Prolog i can't create an array what else should i do? Thanks in advance

1

1 Answers

0
votes

You can try to record the information in a list of pairs [(gameA,7), (gameB,12)] or in asserted facts. The main question here would be how would you like to manipulate your data, and depending on your answer this or that data representation will be better suited.