473,322 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Need a 3x3 and a 4x4 grid code

This is what I have so far, my goal is to get this to display a randomly chosen 3x3 grid of words from Words.txt, which has 10 words, and then will swap one word of those out, note which one it is, then replace it, the grid will be wiped after 30 seconds.
This is what I have so far
Expand|Select|Wrap|Line Numbers
  1. Module Module1
  2.  
  3.  
  4.     Sub Main()
  5.         Dim Choice As Integer
  6.         Dim fileReader As System.IO.StreamReader
  7.         Dim stringreader As String
  8.         Console.ForegroundColor = ConsoleColor.Blue
  9.         Console.WriteLine("For easy mode, type 1, for hard mode type 2")
  10.         Console.WriteLine("Easy mode has a 3x3 grid of words, 4x4 for hard")
  11.         Choice = Console.ReadLine()
  12.  
  13.         Select Case Choice
  14.  
  15.             Case 1 'Easy Mode
  16.                 Console.WriteLine("Hardmode")
  17.                 fileReader =
  18.                 My.Computer.FileSystem.OpenTextFileReader("N:\Controlled Assessment One\WordsEdited.txt")
  19.                 stringreader = fileReader.ReadLine()
  20.                 Console.WriteLine("The first line of the file is " & stringreader)
  21.  
  22.                 Console.Clear() 'Adios, written things
  23.  
  24.                 'Calls up a modified file   fileReader =
  25.                 My.Computer.FileSystem.OpenTextFileReader("N:\Controlled Assessment One\WordsEdited2.txt")
  26.                 stringreader = fileReader.ReadLine()
  27.                 Console.WriteLine("The first line of the file is " & stringreader)
  28.  
  29.                 Console.ReadLine()
  30.             Case 2 'Hard mode
  31.                 Console.WriteLine("Easy Mode")
  32.                 fileReader =
  33.               My.Computer.FileSystem.OpenTextFileReader("N:\Controlled Assessment One\Words.txt")
  34.                 stringreader = fileReader.ReadLine()
  35.                 Console.WriteLine("The first line of the file is " & stringreader)
  36.  
  37.                 Console.Clear() 'Adios, written things.
  38.  
  39.  
  40.                 'Calls up a modified file
  41.                 fileReader =
  42.             My.Computer.FileSystem.OpenTextFileReader("N:\Controlled Assessment One\Words2.txt")
  43.                 stringreader = fileReader.ReadLine()
  44.                 Console.WriteLine("The first line of the file is " & stringreader)
  45.             Case Else
  46.                 Console.WriteLine("Incorrect Output")
  47.         End Select
  48.  
  49.  
  50.         Console.ReadLine()
  51.  
  52.  
  53.     End Sub
  54.  
  55.  
Oct 9 '15 #1
1 1209
Expand|Select|Wrap|Line Numbers
  1. While Not fileReader.EndOfStream
  2.             For x to 16
  3.  
  4.         End While
  5.  
Trying this
Oct 9 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ali | last post by:
I am in great need of code that will make a dome. I would like the inputs to be similar to that of the sphere. ie: pos=(x0, y0, z0) radius = R color = (r,g,b) etc. I am using VPython of...
1
by: Cibulya Dmitriy | last post by:
Hi All, I want to catch the next MSSQL error in my SQL code with following continue calculations Server: Msg 17, Level 16, State 1, Line 1 SQL Server does not exist or access denied.
34
by: Mark Kamoski | last post by:
Hi-- Please help. I need a code sample for bubble sort. Thank you. --Mark
2
by: Mark Kamoski | last post by:
Hi Everyone-- Please help. I need a code sample for merge sort. Thank you. --Mark
1
by: Riyadh Hossain | last post by:
I am developing USPS shipping API for my site. All the work is going on testing phase. My site uses PHP/MySQL. Now I am working on USPS tracking/confirm. I can send request and get responses from...
0
by: ravibrl | last post by:
Hey I need c++ code to access a webpage and download some software. If I execute that it should download that software and it should install it in my system. Give suggestions how to write that code...
3
by: dee vee bee | last post by:
this is my project i need a code that will show like this.. "first number __" "second number ___" "choose operation: addition..subtraction..multiplication..division" "the answer is ___" the...
1
by: saravanatmm | last post by:
I need javascript code for validate the email address. Email address field cannot allowed the capital letters, special characters except '@' symbol. But can allowed the small letters, numeric...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.