• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

create a move function

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I have this code and I would like you to help me to find a function, that I can call in my main code, which could move a letter independently (up, down, left, right) of the others. This function would have to display the new matrix and delete the old one. I have not been able to do otherwise for all the characters.
Thanks in advance.

 
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

Please look at this link about the code button; you didn't quite use it correctly, but I have set that right. Unfortunately I can see some style problems, including the names of your classes, and using tabs for indentation. It is also usually a mistake to make something static without a good explanation.
Please explain what you would like to do. What do you mean about moving a letter?
It might be easier if you use char[]s rather than Strings because a char[] is mutable and Strings are immutable.
 
reply
    Bookmark Topic Watch Topic
  • New Topic