• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Career
  • Opportunities
    Find your next career challenge – powered by Qualified Jobs
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Log In
  • Sign Up
jfconde Avatar
Name:Juan Carlos
Clan:BBVA
Member Since:Jun 2017
Last Seen:May 2021
Profiles:
Following:1,479
Followers:1,478
Allies:1,478
View Profile Badges
Ad
Promoted
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (5)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • jfconde
    • commented on "Simple assembler interpreter" kata

    Sorry, I'm quite newbie'ish in the site :(

  • Custom User Avatar
    • rasmus_ri
    • commented on "Simple assembler interpreter" kata

    Spoiler flag!

  • Custom User Avatar
    • jfconde
    • commented on "Simple assembler interpreter" kata

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
    • jfconde
    • commented on "Simple assembler interpreter" kata

    What I did is move the task of increasing the IP out of each instruction. Then in what would be your "process" method, I would wrap that self.instructionParser... inside an if, like this:
    if (!self.instructionParser...) : self.IP += 1
    And only the jnz instruction returns true (I called this "Hold IP"). Also, in the jnz method I think you're supposed to handle both constants (ints) and registers, so I defined another method valueOf(x) that returns x if it is a number, or the value of your self.regis[x], if it is alpha (isNaN, actually).
    I did not process (split) the instructions array in advance, although I think that's more up to personal likes :)

  • Custom User Avatar
    • jfconde
    • commented on "Extract the contents of a given tag from the HTML document" kata

    Yes. This I exploited by using an easy RegExp. Better tests more than more tests.

  • © 2022 Codewars
  • About
  • API
  • Announcements
  • Privacy
  • Terms
  • Contact
  • powered by

Confirm

  • Cancel
  • Confirm

Collect: kata

Loading collection data...

Add To My Collections
    • View
      Remove Add
    You have not created any collections yet.

    Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.

    Get started now by creating a new collection.

    You must wait until you have earned at least 20 honor before you can create new collections.

Set the name for your new collection. Remember, this is going to be visible by everyone so think of something that others will understand.

Create & Add New Collection