Need help with a Constructor

I’m working on an assignment for a Unity class and I need to create a constructor for the Card class in this script, but there are some specific requirements that I’m just entirely in the dark about. I need to pass both a String and int variable through the constructor that need to be set to the variables I’ve created earlier. Can anyone help me out? Here’s the code I’m working with -

class Card extends System.Object

{
private var boolean : faceUp = false;

private var boolean : cardMatch = false;

private var string : card = "";

private var int : ID = 0;
}

**CONSTRUCTOR HERE**

First off I would recommend you read the coding tutorial.

In C# it would be:

public Card(boolean faceUp, String card,int id .... ){

  this.faceUp = faceUp;
  this.card = card;
  this.id = id;
}

You are using JavaScript though. I don’t use JavaScript but I don’t think it supports constructors because it’s not really object oriented. Unity provides life cycle methods for this purpose. It looks like you are creating a data model object because all of your variables are private so for JavaScript you would have to make all the vars public or provide mutator methods that change them or otherwise operate on them. In C# make them public properties. In order to interact with the inspector you might want to consider making this a ScriptableObject