Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Recent content by brabra551

  1. brabra551

    Python temporary list

    deck is a list of string ( ['A','C','Z','X'] ) copy does the work, thank you !
  2. brabra551

    Python temporary list

    Hi guys del is modifying tmp_deck and deck itself, how can I make tmp_deck temporary so I can modify tmp_deck in the loop and reset it to deck value for each round of the for loop ? f = open("in.txt","r") lines = f.readlines() def search (deck): for word in lines: tmp_deck = deck...
  3. brabra551

    JavaScript Dynamic variable in an other variable

    I meant in the console log yep. Thanks for your advices.
  4. brabra551

    JavaScript Dynamic variable in an other variable

    First of all thank you for your elaborated answer. I said that it was what the code looks like, it’s not the real code which is even more complex ^^ I guess that I make things complicated when it’s not necessary, maybe I’ll call a pro programmer when I’m done to check for optimizations. My...
  5. brabra551

    JavaScript Dynamic variable in an other variable

    Here is a great idea of what the real code looks like, sorry if it's confusing ... I'm a noobie let dict = { pos: [1,1],[2,2] ,pos2: [3,3],[4,4]}; let pawn = class { constructor { this.int = 0; // index for pos1 this.anotherint = 0; // index for pos2 this.position = [0,0]; //...
  6. brabra551

    JavaScript Dynamic variable in an other variable

    var var1 = 12; var var2 = [var1,"fruit"]; var var1 = 4; console.log(var1,var2); output : 4 [12,"fruit"] how do I turn it to : 4 [4,"fruit"]
  7. brabra551

    JavaScript Canvas images coordinates makes no sense

    Hey, I'm trying to make a ludo game that's responsive, I've managed to get the plateau to be working great but I'm stuck when it gets to register a click on a pawn. Pawns are drown with images. Then I use the same coordinates as the image in my eventlistener and eventually they are not the...
Back
Top Bottom