עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

קליטת נתונים זהים ל2 שחקנים שונים

Featured Replies

פורסם

יש לי משחק עם 2 שחקנים בצבע אדום וכחול...

אני צריכה לקלוט אותם נתונים משניהם... האם יש דרך לעשות זאת ללא שכפול קוד?

בנוסף בכותרת צריך להיות רשום צבע השחקן...

int numOfSoliders, numOfDragons;
		System.out.println("*********** GAME OF Thorne BOARD X * X **************");
		System.out.println("Enter the size of board: ");
		int size = s.nextInt();
		gameOfThrone board = new gameOfThrone(size);		
		//		 System.out.println( + "PLAYER CHARACTER CREATION ********");

		// There are 2 players (RED and BLUE)
		for (int  k= 0; k <players ; k++) {
			System.out.println("Enter the number of soliders:");
			numOfSoliders = s.nextInt();
			for (int i = 0; i < numOfSoliders; i++) {
				System.out.println("Enter solider " + (i + 1) + " info");
				System.out.println("Enter x value:");
				int xValueSolider = s.nextInt();
				System.out.println("Enter y value:");
				int yValueSolider = s.nextInt();
				board.addSoldier(xValueSolider, yValueSolider, "Red", true, i+"");
				board.addSoldier(xValueSolider, yValueSolider, "Blue", false, i+"");

				System.out.println("Solider created Successfuly!");

			}

תודה (:

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.