Raspberry Pi For Dummies. Sean McManus
Чтение книги онлайн.

Читать онлайн книгу Raspberry Pi For Dummies - Sean McManus страница 29

Название: Raspberry Pi For Dummies

Автор: Sean McManus

Издательство: John Wiley & Sons Limited

Жанр: Компьютерное Железо

Серия:

isbn: 9781119796879

isbn:

СКАЧАТЬ Search menu has options to find a particular word or phrase, go to a particular line in the document, or replace a chosen word or phrase with an alternative. When using Find and Replace, you can check the box beside Replace All to change all occurrences of your search term in one go, or you can step through them individually using the Replace button.

      The Document menu has an option to switch on word wrap (which means text starts a new line when it reaches the edge of the window, instead of a horizontal scroll bar appearing). The auto-indent feature means that any indentation used on one line is automatically applied to the next line when you press Enter.

      Under the View menu, you can switch on line numbers and change the color scheme.

      In the Preferences part of the Applications menu, you can find the Print Settings. Here you can see the print queue and add and remove printers. On Sean’s Raspberry Pi, Print Settings automatically detected and set up his network-connected printer.

      The underlying Common Unix Printing System software is open source and depends on the contributions of volunteers, so not every printer is supported. If you have a reasonably old network-connected printer, it should work fine. Newer models and USB-connected models are less likely to be well supported.

      You can do quite a few things to stamp your identity on the desktop and make it easier to use. As with other desktop computers you might have used, you can change the look and feel of it. To find the options for this, click Appearance Settings in the Preferences section of the Applications menu.

      In the desktop options, you can change the picture used as a backdrop (the wallpaper), change the desktop color if you’re not using wallpaper, and change the color of icon descriptions (the text color). You can tick a box to display your Documents folder and mounted disks on the desktop, which makes it easier to find your files. The Taskbar tab gives you options for changing the size, position, and color of the menu bar that is usually at the top of the screen. The System tab enables you to change the default font used throughout the desktop environment and the colors used in the title bars of windows.

      

You can also get to the appearance settings by right-clicking the desktop and choosing Desktop Preferences from the menu that appears.

      To adjust the sensitivity of the keyboard and mouse, use the mouse and keyboard settings in the Preferences section of the Applications menu. For left-handers, you can swap the left and right mouse buttons, too.

       Boing!: This is a version of Pong, a bit like digital tennis. Two players bounce a ball, left and right, between them. If one player misses, the other player scores a point. If you play alone, your bat is on the left. You can choose one or two players on the start screen using the arrow keys. Press the Spacebar to start the game or get back to the menu when it ends. Player 1 (left) uses the A and Z or Up and Down keys to move. Player 2 (right) uses the K and M keys. The computer can be your Player 2. The first player to score 10 points wins.

       Bunner: This a clone of Frogger, where your challenge is to move safely up the screen, dodging traffic and crossing rivers by leaping onto logs. Press the Spacebar to start the game and get back to the title screen at the end, and press the arrow keys to move.

       Cavern (see Figure 4-10): This game is inspired by Bubble Bobble, another classic from the ’80s. Move your monkey character with the arrow keys, avoiding the robots. Use the Spacebar to fire a bubble to entrap the robots, as you zip around collecting fruit. When you fall off the bottom of the screen, you come back at the top.

       Minecraft Pi: See Chapter 13 for information on playing and programming this game.

       Myriapod: Use the arrow keys to move and the Spacebar to fire in this Centipede clone. Your gun is at the bottom of the screen. Your aim is to shoot and destroy the centipede that crawls down the screen and to avoid getting hit by the fly, which you can also zap. Destroy rocks to make it easier to shoot the centipede. We use a screen resolution of 1,024 x 768 usually, but we had to change it to 1,152 x 864 to see the whole game arena.

       Substitute Soccer: This football game has three difficulty levels. Move using the arrow keys and Spacebar to pass or shoot. If you have a friend over, they can play using the W, A, S, and D keys to move and the left Shift key to pass/shoot. A triangle above a player shows which one is active.

      These games were coded by Raspberry Pi cofounder Eben Upton, and come from the book Code the Classics, Volume 1. Find it in the Bookshelf app.

      There is also an entry called Python Games, which gives you access to 12 further games, written by Al Sweigart. Click a game to select it. The games are as follows:

       Flippy: A version of Reversi. Click to place your counter. Any counters in a line between your new counter and any of your other counters will switch to your color. The winner is the one with the most counters in their color.

       Four in a Row: Click and drag the pieces to drop them into the frame. The winner is the first to get four pieces in a row, in any direction. The computer AI is pretty smart!Raspberry Pi FoundationFIGURE 4-10: Cavern, one of the games in Raspberry Pi OS.

       Gemgem: In this game, there’s a grid of gems. You can swap any two neighboring gems to make a row of three, which then disappear. Use the mouse to click the two gems you want to swap. It’s against the clock. Achieving a row of three extends your time.

       Inkspill: This is a favorite of Sean’s. You have a grid of colored squares. Starting at the top left, you change the color of the ink. Any squares of the same color that are touching the square join your ink spill, making it bigger. The idea is to keep changing colors to try to fill the screen with a single color.

       Memory Puzzle: This is a version of Pairs or Concentration, a classic card game. You click a card to turn it over, and then click another card to see if they match. Your aim is to pair up all the cards.

       Pentomino: This version of Tetris uses the arrow keys to move the blocks and the Q key to rotate them. The aim is to stop the blocks from piling up to the top of the screen. When you complete a row, it disappears. This game has some different tile designs from the original game.

       Simulate: This game is a pattern repeating one. Click the panels to repeat the sequence that’s played to you.

       Slide Puzzle: This sliding puzzle game uses the arrow keys or mouse to move tiles. Can you unscramble the puzzle?

       Squirrel: Your aim is to eat the smaller squirrels, while avoiding the bigger ones. Each time you eat, you grow. Move using the arrow keys.

       Starpusher: This puzzle game starts easy but gets harder. The game challenges you to СКАЧАТЬ